Always Get Better

Life in Linux

August 6th, 2010

So I wiped my hard drive and installed Ubuntu. After struggling with the decision to switch from Windows for some time, I finally resolved to move.

So far the results have been very good. My system boots up and is ready to use in less than a minute, there is no lag loading and switching programs, and everything I need for my day-to-day programming is available much more readily than it was with the other operating system.

The most striking difference to me is the amount of disk space I now have available to me. With all of my software, work projects, and operating system overhead, Windows left 80Gb free from my 285Gb drive. With all of my projects, code libraries, files and operating system installed, Ubuntu uses just 6.7Gb, leaving 97% of the drive available for my use. I am blown away by how much less clutter I have now.

I haven’t tried to do very much with Mono yet; we’ll see how it works when I try making improvements to my SiteAssistant project. I’ve been reading about Mono’s Winforms capabilities and so far am impressed by the possibilities. We’ll see how well it works with my fairly simple project; with any luck I may have found a cross-platform .NET solution with this one. Maybe the Winforms explorations will be a good topic for a future post.

Not missing Office yet, either. My Quicken financial software has been running perfectly under Wine, and all of my files appear to have made the move intact. I still own licenses to all my software, so on those rare instances if I really need it I can install Windows with VirtualBox and fill up some of that hard drive space I’ve earned.

Installing Git on Ubuntu 10.04

August 5th, 2010

Here’s how to install Git on Ubuntu 10.04


sudo apt-get install git-core

(The package name is git-core, not git)

Thinking About Switching to Ubuntu

August 2nd, 2010
Ubuntu-logo-unique-image
Creative Commons License photo credit: Jeffpro57

In the last number of weeks I have been seriously considering taking the plunge and wiping my Windows laptop clean in order to switch to Ubuntu as my primary machine. Although Windows 7 has gone a long way toward smoothing over the problems Vista brought, it isn’t perfect.

Windows isn’t a bad operating system, by any means. Like OS X and Ubuntu, it has its strengths and weaknesses. However, as a developer whose primary work involves web pages, I definitely see Windows as more of a barrier to efficient workflow. There are a few pieces of software that have kept me on Windows for awhile but which just don’t hold me back anymore:

1. Microsoft Office
I definitely qualify as a power user for this software. Yes, OpenOffice can do most of what MS Office can, but I will sorely miss the features that “most people” don’t use. However, the majority of my work doesn’t touch Office – in fact, it’s relatively rare that I will need Access, or Word, or even Excel. When I do use these programs, it only tends to be in support of a client who has used them inappropriately for some data storage.

I’ve long outgrown Outlook due to the amount of mail I keep; I don’t like to delete anything because true professionals are able to refer back to projects no matter how old. I don’t have a replacement mail program yet; but so far the Gmail interface has been more than sufficient.

2. Visual Studio
This software is giving me pause. If I switch over, I will be giving up my ability to truly work in the .NET world, which is where I have largely been for the past decade. Most of my workflow recently has been with the open source, PHP-driven web world and I’m not sure that I’m excited about going back to a pure Microsoft environment. That said, I want to be sure I’m not closing any doors.

Mono has made great strides in bringing the .NET platform, specifically C#, over to Mac and Unix, but the more Windows-centric database and GUI interfaces don’t translate over very well. I can always run a Windows Virtual Machine for the rare instances I will need to work on that platform, but it seems a bit counter-productive to keep around an environment that I don’t use for the sake of a few days each year.

3. Quicken
My other strong reason for staying with Windows has been my love for Quicken – the Mac version just doesn’t compare to the Windows version – and my inability to manage my finances on paper after years of dependence. Since so much of my data is tied into this software, any switch will involve either years of data entry or a major hit to my forecasting abilities.

Fortunately, Wine has come to the rescue – last night I was able to get a full install of Quicken on my test/Ubuntu machine with absolutely no problems! The fonts looked a little weird in the reports, but otherwise all of the functionality was there and working beautfully. It even looked like a Linux app – unbelievable!

Should I Stay or Should I Go?
So the big thing I’m weighing in my head right now is whether I can stand to give up the .NET programming I have been involved with for so long and switch to a full Linux environment. I still love my Windows environment and software, but it just doesn’t seem to make sense to keep it given my current open source focus.

Resumes Are Better Without Alphabet Soup

June 2nd, 2010

You can spot them a mile away – resumes that look like someone loaded up a Microsoft Word template, punched in their information, then sent it to every job posting they could find.

Does this sound at all like your resume?

They probably start with an Objective statement proclaiming the candidate’s desire to secure a position among a progressive and upward-mobile organization.

Next up is the candidate’s skills, a veritable alphabet soup of every technology they ever came across. Honestly, does anybody really have useful knowledge of everything including ASP, Java, C++, Assembly, COBOL, Lisp, Python, Erlang, Ruby, PHP and Haskell? Yes, we get that you are smart and can work in any environment we throw at you, but what are you awesome at? I can’t tell.

Next is education, usually just the program name and sometimes a GPA. No real details about what the program consisted of – the point, after all, is that the candidate has an education, right?

Finally, the awful listing of every company the candidate has ever worked at going all the way back to the summer job they had in high school. Each is illustrated with so many jargon-filled bullet points that the resume takes up three pages and gives no really useful information about the candidate or their skills.

Sad to say, most resumes fit this pattern. The good news for you is the bar is set low which means it can be incredibly easy to stand out from the crowd.

Lose the Objective
The objective statement is the biggest sin academia has thrust into the world. The company you’re applying for does not care about your objectives and long term plan; their concern is finding a skilled worker who can meet their objects. Sorry to re-use a tired paraphrase, but ask yourself what you can do for the company, not what the company can do for you. Leave your expectations out of the mix until you hit the negotiation stage.

Less is More
Rather than listing every programming language you’ve ever heard of, list the top 2 or 3 you’re best at. If that means you can only list PHP because you live breathe and eat it, do so.

This is a bit intuitive: Showing a dozen skills will not keep the doors open for the best possible job. The reverse is true – rather than leaving recruiters confused as to whether you’re a good fit for their job, let them filter you if need be. Think about it – if you are that amazing PHP programmer, do you really want to be developing COBOL on mainframes all day?

Tell a Story
Try to put yourself in the shoes of the person who will be reading your resume. They will be reading other people’s resumes as well, most of which will look alike except for the author name at the top of each page. It should be a fairly easy job – just pick the candidate whose skill set matches the requirements of the job and hire them.

The reality is much more difficult. Even if a manager has the budget needed to hire someone, they may not be able to find the right person to fill the job. Skill is only part of the story – personality also plays a large factor. It isn’t enough to have someone who knows the job; it has to be someone who will fit in with the team and be a pleasure to work with.

Don’t just talk about your skills – talk about you. What do you bring to your work that no one else on earth can duplicate? You could start with a ‘hobbies’ section on your resume, but I recommend injecting as much of your own voice everywhere you can.

Rather than simply describing your job functions for each position you held, write about what your learned during your time at each company. What contributions were you able to make to the bottom line? Remember, your potential employer is hiring you because they want to make money.

Tethering the Internet, Week One

May 29th, 2010

So I’ve been tethering my phone and using it as a backup Internet connection for just over a week now and so far I have been pretty happy with the results.

Using Xplornet as my primary source and my cell phone tethered into my computer via USB, I’m actually able to get fairly reliable service – the computer switches back and forth between whichever connection happens to have access to the Internet.

This could work…

I see that Bell is now offering a 2Mbps modem for rural residents. I’d like to try that as an alternative to Xplornet – maybe I’ll be able to drop my contract in March and have reliable net.

Using a Cell Phone as Backup Internet

May 24th, 2010

Since we live in the country and rely on line-of-sight Internet for our connectivity, I’ve been increasingly frustrated with service quality and uptime programs. There are a lot of reasons I want to move to a denser population area but access to a proper Internet connection is high on my list.

My phone has turned out to be a decent alternative; using instructions I found online I was able to re-purpose my Palm Pre as a WiFi router. It’s still not broadband but it gives me a way to check my email when my Xplornet fixed wireless (often) fails.

Although Bell Canada supports tethering with their smartphone plans, they don’t go out of their way to make it obvious how to do it. My Tether turned out to be worth the cost; even though there is a free version you can use if you want to play with the settings.

Display Class Objects in CheckedListBox

March 28th, 2010

If you want to use anything more complex than a list of strings in a ListBox, you’re in luck because the control accepts all types of objects.

Custom Objects (Blog Posts) Displayed in a CheckListBox

Custom Objects (Blog Posts) Displayed in a CheckListBox

In this case, I want to display a list of posts found in a blog. Blog is a class which contains Posts, an array of Post classes. To start, I created the CheckedListBox in the form designer, and I add the posts to it like this:

clbPages.Items.AddRange(_blog.Posts);

If I do nothing else, the ListBox will call the Post’s ToString() method and will display as:

Post
Post
Post
Post

We have two options for displaying this correctly:

1. Override the ToString() method. I don’t recommend doing this because ToString() is much more appropriately used in a debugging context.

2. Add a string converter: This will automatically convert each post object to a usable string when called by an object like a ListBox. ListBox uses Convert.ToString() – this uses that converter more appropriately. ToString() should only be used as a fallback.

<pre>
// Use System for the Type object
using System;
// Use ComponentModel for the TypeConvert base class
using System.ComponentModel;

namespace SiteAssistant.Blog
{
    /// <summary>
    /// Converts a post into a list-friendly string, for checkbox lists
    /// </summary>
    class PostConverter : TypeConverter
    {
        /// <summary>
        /// Indicates whether the Post can be converted to a destination type
        /// </summary>
        /// <remarks>
        /// We only support conversions to STRING at present
        /// </remarks>
        /// <param name="context"></param>
        /// <param name="destinationType"></param>
        /// <returns></returns>
        public override bool CanConvertTo(ITypeDescriptorContext context,
            Type destinationType)
        {
            if (destinationType == typeof(string))
                return true;
            else
                return base.CanConvertTo(context, destinationType);
        }

        /// <summary>
        /// Converts the post to the destination type. If the destination
        /// type is not supported, the base Conversion is applied.
        /// </summary>
        /// <remarks>
        /// We only support converting posts to strings at present.
        /// </remarks>
        /// <param name="context"></param>
        /// <param name="culture"></param>
        /// <param name="value"></param>
        /// <param name="destinationType"></param>
        /// <returns></returns>
        public override object ConvertTo(ITypeDescriptorContext context,
            System.Globalization.CultureInfo culture, object value,
            Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                string text = "";
                Post p = value as Post;
                // Ensure that the Post is not null, avoid errors
                if (null != p)
                {
                    text = p.Title;
                }
                return text;
            }
            else
            {
                return base.ConvertTo(context, culture, value, destinationType);
            }
        }
    }
}
</pre>

The code we write in .NET is like the meat inside a sandwich. The framework is the bread that wraps around our logic and keeps our application together. Our new Posts string converter will be called by the application without us needing to override the Convert function.

It doesn’t happen by magic of course. The final change we have to make is to add information about our conversion function to the posts class:

<pre>
    [System.ComponentModel.TypeConverter(typeof(PostConverter))]
    public class Post
    {
        // Rest of the code goes here
    }
</pre>

That’s all there is to it! Now we can pass a list of Posts to the CheckedListBox and manipulate each item directly. In this application, I will be using this technique to provide the Post object to the text editor with a double-click.


SEO Powered by Platinum SEO from Techblissonline