Shopping for Cars

My current car, a 2013 Chrysler 200 Limited, is under a lease that will be up in June. I loved this car far more than I expected to, given the reviews on it, but I can provide more color to that later. The end story is that the residual value of my car (the amount I'd have to pay to purchase it) is going to be about $5,000 more than what it blue books for, so it makes precisely zero sense to purchase it. I have to find a new car.

I thought it'd be interesting, maybe only for my own historical purposes, to talk about the vehicles as I drive them and come to a conclusion. I managed to hit the local auto show a few weekends ago to pull my list under ten cars, but I'm still all over the place in terms of size, power, and price. Currently, in the running, I have:

  • 2016 Chrysler 200C - I liked mine so much, and the new one apparently looks/feels/performs so much better.

  • 2017 Chevrolet Volt Premier - The concept of mostly electric driving sounds great, with a little bit of fuel to back it up. The second generation actually looks like a car.

  • 2016 Fiat 500x Lounge - Not much for SUVs, but this looks classy while still being small enough to whip around.

  • 2016 Buick Regal Premium II or GS - Buick wasn't on my list until the auto show, these looked nicer than I ever expected.

  • 2016 Volkswagen GTI SE 4-Door - I love the idea of a small car with a nice turbo.

  • 2016 Nissan Maxima SL or Platinum - I can't stop staring at these -- the design is funky but approachable, the interior looks amazing, and it has the big Nissan V6.

  • 2016 Kia Optima SX or SXL - Kia wasn't originally on my list, but a good friend of mine has one and likes it a lot.

  • 2016 Audi A4 - With the introduction of the 2017s, these actually become reasonable. I had a 2008 that I really liked, except for what the previous owner did to it.


What do I want? I want something that is comfortable to commute in, with a great stereo system with navigation and/or Android Auto, comfortable seats with heat, and enough performance to let me smile once in a while. I already have a project car, so it doesn't have to be insane, but I don't want a dog. Naturally, I err on the side of more interesting gadgets, so I'd love to have things like adaptive cruise control and lane departure warnings. I'd also love to have ventilated seats. Bonus points if I can get a brown leather interior.

The 200 I have now has an incredible sound system, by Boston Acoustics, of all people, navigation, heated leather seats, a sunroof, and the Pentastar V6, a 283hp beast that was ill-suited for this car's platform, but puts a big grin on my face regardless. It seems you can get it to 60 in 6 seconds, but that implies you have traction.

On with it! Nick, 2016-03-31 at 13:25:27
0 comments

Log4Vala - A logging framework for Vala inspired by Log4J

It's getting pretty easy to see that I should start finishing some entries for this blog if it's going to be at all relevant or useful, but I'll take a moment to introduce another "thing".

This past weekend, while working on a web project in Ambition, I started wishing I could control logging in a better way than what was already provided. Specifically, I wanted to be able to amp up logging in one controller while keeping another one quiet. In a horrific turn of events, I found myself longing for something like log4j/log4perl/log4net so I could use a configuration file to handle that.

A few days go by, and here we are.

Introducing Log4Vala, available on GitHub. Available as a shared library to integrate into your Vala application or library, Log4Vala provides most of the core concepts available in the other logging frameworks, without a lot of overhead. Yes, there are still a few method calls for each logging pass, but it's quiet a bit tighter than a VM environment. I'm pretty happy with the result.

Patches/documentation/heckling welcome. Nick, 2014-06-19 at 18:07:37
0 comments

GCouchbase - A reasonable Couchbase library for Vala

I'm pleased to announce that there is a reasonable Couchbase library coming along for Vala, and it is semi-functional at this point. Sure, an announcement seems weird at "semi-functional", but considering the absence of a library up to this point, I'm calling it good.

Introducing GCouchbase (github/web).

GCouchbase is a combination of a fully functional vapi wrapper around the C libcouchbase library and a pleasant GObject layer on top of it. The libcouchbase functionality is available to the end user via GCouchbase or on its own, but GCouchbase makes the library work more like how one would expect out of a higher level language. The structure is loosely based off of the .NET library, but does not rely on libmemcached or any other proxy layer.

For those who may not be aware of what Couchbase is, it is (in my humble opinion) NoSQL done right. While similar in functionality to other offerings like MongoDB or CouchDB, Couchbase combines a persistence layer with a memory layer to provide fast, scalable JSON blob storage and retrieval that scales evenly with memory and CPU. In other words, you don't need to have a cache layer, a data layer, and a replication layer, Couchbase handles it for you. The built in view functionality is powerful, but can directly connect to an ElasticSearch instance for advanced queries.

It's very neat, and blends in nicely with the speed of Vala. Nick, 2014-01-01 at 22:46:31
Tags: vala couchbase
0 comments

I'm speaking at Twin Cities Code Camp 15!

I will be presenting the Ambition MVC Framework at TCCC15. Twin Cities Code Camp is a free event that occurs twice a year at the University of Minnesota in Minneapolis, MN, and it caters to novice to advanced developers using multiple languages and devices. TCCC15 will be held on October 19th, 2013, starting at 8:00am, and you can register here.


The synopsis of my talk:

There are tons of great MVC web frameworks out in the wild, for most major compiled and dynamic languages. They're great tools to get projects prototyped and quickly into production. The Ambition MVC framework is a hobby that turned into a reasonable web framework. Written using Vala, the Ambition framework allows a developer or team of developers to create web applications or RESTful services using a static-typed object oriented language without relying on a VM or a garbage collection cycle. Plus, being compiled, it allows cloud deployment to be easy and inexpensive, as memory and CPU requirements can be a fraction of PHP, Ruby, Python, or Perl sites. While it's not "officially" released, it's available on GitHub, and being actively developed. Patches, help, and end users are very welcome, and I'd like to show you more. Nick, 2013-10-08 at 18:49:28
0 comments

Welcome Back

After some thought and paging through many years of old, outdated technical advice, I have migrated my blog to a new domain with a bit of a fresh start. Because I never want to let go of what I've said in the past, I kept a few entries around for grins, but will start fresh and new from here on forward.

Welcome to my new blog.

The main reason I'm writing here is to share thoughts and elicit some conversation about modern development on the web and in the cloud, using old and tired technology, as well as new and busted technology. With any luck, none of the entries will end with "get off my lawn". Nick, 2013-08-22 at 08:21:49
Tags: none
0 comments

Adventures in Vala: Ambition Framework

Quite some time ago, I posted about my Adventures in Objective-C, postulating that people would be willing to rapidly develop in a static-typed language if the language was easy to deal with. I created the foundation of a web framework that didn't do too much, but was functional enough to prove that it was possible. I also gave up shortly after, as I found development on Windows and Linux to be a gigantic pain -- too few libraries, not much support.

Some of the same ideals I was going for in that previous post still hold true. Java still clicks in a weird way for me, even if it's too verbose and runs in a VM and 90% of the web frameworks for it annoy me to death. Objective-C was cute, but mostly useless for me. I don't mind the idea of C#, except for the fact that it's Windows-centric, and I'm still uncomfortable putting my eggs in the Mono basket.

In the meantime, I stumbled across a language called Vala. Vala's roots are in the GNOME community, where they have a couple of great C libraries: GLib, and included in that, GObject. Using this standard library, C-based GNOME applications have had a lot of the great benefits of object oriented programming while maintaining the speed and support of the C language. Unfortunately, you got everything else that C provides: no memory management, no namespaces, and difficulty in reading it later.

I'm going to get flamed for that.

Nevertheless, other people saw some of those same things. They also saw some Mono applications creeping into the GNOME core, and felt that all the pieces were there to do something better. Vala was born as a true object oriented programming language, with a very similar design to C#. The difference is, it relies on GLib and GObject to accomplish the OO goals, and therefore, compiles into C, which is then compiled by gcc. As a result, you get significantly smaller and faster binaries than VM-hosted languages, with very minimal pain. Furthermore, you don't need to use GTK or anything like that, it's still a general purpose language that can be hosted on any platform that can compile GLib. That means I can code on OS X and Linux, and, while I haven't done it in a while, Windows can join the party as well.

You see where this is going.

In the end, I took my ideas for a reasonable web framework, and started porting them to Vala. Months ago, I had a proof of concept similar to the ObjC example in my previous post. But, I kept working on it. Routing, templates, plugins, configuration, build systems, all managed to find their way in. Then, the nice things. Session, Authorization, and Form frameworks are a part of it. I've started on a fairly simple ORM, as well, Almanna. The result is, well, this.

This blog is the first production test of the framework. I ported the blog software from Catalyst to Ambition, launched it here on the existing database, and I'm going to see all the places it fails. It will likely do a lot of failing, but it's a decent first effort. After a little stress testing, I'll open this up on GitHub, and see where else it can go. Nick, 2012-07-18 at 15:49:21
0 comments

Detecting scrolls in an Android ScrollView widget

So, Android.

You would think that Google would have an event available for when someone scrolls a ScrollView widget. After all, it's the basic way to make some view scroll. Even better, there is an event for the AbsListView and other scrollable widgets. Turns out, there is an event that gets fired in a ScrollView, but you have to subclass the widget to get at it. Then, you have to figure out how to get that message back to your controller.

Lame.

So, for those of you who want to see if a scroll changed on a ScrollView, do the following:

1) Create a class, call it whatever you'd like, but subclass ScrollView. You'll probably need to override the three existing constructors to be able to instantiate from your controller or XML layout.


public class ExampleScrollView extends ScrollView {
    public ExampleScrollView(Context context) {
        super(context);
    }

    public ExampleScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ExampleScrollView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
}


2) Add an interface within our new class to be able to set a listener. We'll call it something different so we don't override any existing OnScrollListeners.


public interface OnScrollViewListener {
    void onScrollChanged( ExampleScrollView v, int l, int t, int oldl, int oldt );
}


3) Let's add a private attribute and a way to set that listener in the class.


private OnScrollViewListener mOnScrollViewListener;

public void setOnScrollViewListener(OnScrollViewListener l) {
    this.mOnScrollViewListener = l;
}


4) Now, set onScrollChanged to fire the event we provide.


protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    mOnScrollViewListener.onScrollChanged( this, l, t, oldl, oldt );
    super.onScrollChanged( l, t, oldl, oldt );
}


You're done! You can now set up one of these in your XML layout, or built on the fly. Set your new listener like this, provided you have one in your layout with an id of 'example_scroll_view':


ExampleScrollView exampleScrollView = (ExampleScrollView) findViewById( R.id.example_scroll_view);
exampleScrollView.setOnScrollViewListener( new OnScrollViewListener() {
    public void onScrollChanged( ExampleScrollView v, int l, int t, int oldl, int oldt ) {
        Log.d( "Scroller", "I changed!" );
    }
} );
Nick, 2011-05-31 at 13:58:10
10 comments

Lifecycle of an Android Application

Every time I get a new gadget, something possesses me to try to write an application for it. It's happened with dang near everything since the Newton, yet only a few gadgets have ever had a finished project. I tried the hardest on Symbian, but never came up with anything useful. I'd like to blame the SDK, but you should never blame your tools, no matter how much they completely sucked.

In October of 2008, a brand new T-Mobile G1 arrived via UPS, one of the first Google Android devices to hit the market. I had always owned smartphones, whether they ran Windows Mobile or Symbian (S60 or S80), but I wanted to get something that was easy to develop for, and would work well on my network. So, Symbian was out (hated the SDK), iPhone was out (Just started supporting apps, plus no one wants to be on AT&T), Blackberry was out (SDK even worse). Android seemed like a really neat, but young option. Being on the bleeding edge never scared me, it just usually screwed over other people.

So, approximately 3 days after receiving that G1, I downloaded the SDK, and started to use my extremely rusty Java skills to bang out a LiveJournal client for Android. It's not as though I still really used LiveJournal, but I felt like it'd help me try out all of the neat APIs in Android. Web services, location tracking, image capture and manipulation, they were all there and usable. A shell of an application started to emerge around a series of mocked up layouts, and I was able to hook up login, posting, preferences, and user pictures in a short amount of time. ElJay was born, and I even wrote about it here. I'm amused at how proud I was that it was pretty complete after a few days -- because it shows. Since I decided to dive right in instead of going through tutorials and example applications, it was subject to many of the first time Android developer errors. Screen rotation would lose settings, or interrupt a login, or interrupt a post. Web activity would throw exceptions that I never caught. Nothing was in a service, so switching applications or views would interrupt the same interruptables as above. Everything I did was in onCreate, so switching back to the application after Android cleaned house meant that someone would have to log in again. Sometimes, state wasn't kept, so you'd post to no account at all. It was a barrel of laughs. I updated and updated until it was a mess of spaghetti code and generic exception catching. Android 2.0 finally broke it, and I didn't care for a while.

I eventually pulled it from the market.

... until the screams entered my inbox.

A few weeks ago, I recommitted to ElJay, but instead of running through to try to fix it, I made the best and worst choice I could make, and started over. This time, I started it as if I were doing one of my Perl-based web applications, or writing a desktop application -- I started with the back end. My first task was my XML-RPC interface, followed by my LiveJournal model. I created a unit test suite for those external interfaces. I created a suite for all of my display controllers. After a while, I got to the point where I had a decent unit test suite, and a few test accounts that passed the unit test suite. This process took a lot longer than the "few days" it took to bang out the first version, but from a system level, it worked well. It also helped me solve a long-standing bug I ran into in the first version, where the default Java XML library used by Android doesn't handle some output from LJ very well. Hey, I could have saved myself from a rewrite! ... Nah.

Tangent.

Only then did I start working on the user interface. This time, I could actually plan for exception handling, threading, the external service, the sync API, even basic user interaction. It also honors resolution independence properly, since I'm no longer using pixels as measurement. :P It's amazing how much more confidence I feel in this application -- not that I believe it's bug free or foolproof, beta testing will prove that wrong within minutes -- but that I can easily work with it, fix issues, and section pieces out for later. Things are getting really close now, and the beta rolls out in less than two weeks.

For those keeping track, the first version allowed posting with user pictures, security options, tracked your location, worked with tags and moods, and allowed you to save entries for later. The new one does all of that -- and well -- but also adds friends list support, attaching photos to your posts, and with any luck, manage your messages. I'm also throwing ads in, but they're optional.

It does live.

Nick, 2011-04-20 at 13:58:08
2 comments

Fun facts for hard times

When developing for Android, the default button height is 48 dip. Nick, 2011-04-08 at 20:17:11
1 comment

MooseX::Declare, TextMate, and TmCodeBrowser

Do you use TextMate?
Do you use TmCodeBrowser?
Do you use MooseX::Declare?

Must be a pain that nothing shows up the side pane when you start using it. It was for me.

Open '~/Library/Application Support/TextMate/PlugIns/TmCodeBrowser.tmplugin/Contents/Resources/.ctags.tmcodebrowser' in a text editor. Add the following:

--regex-perl=/^[ \t]*(class)[ \t]+([^\ \t;]+)\s*[ \t]*[{;]/\2/c,class,classes/
--regex-perl=/^[ \t]*has[ \t]+'([^\ \t;\(]+)'/\1/p,property,properties/
--regex-perl=/^[ \t]*method[ \t]+([^\ \t;\(]+)/\1/m,method,methods/


Reload TextMate.

Bask in the awesome. Nick, 2010-02-18 at 14:01:34
0 comments
Next Page >
Powered by Ambition