Excursion into Linux Land

July 31, 2007 at 12:30 PMmgordon

I've used Linux , on and off, several times over the past few years.  My past experience has been with using the OS on a server to host email, MySql, etc. - so, I am pretty comfortable with using Linux as a server OS.  Recently, though, because of a combination of blog posts I had read, podcasts I had listened to and comments from some of my cohorts, I was determined to try Linux out as a desktop OS.  I'll admit, up front, that I am and have pretty much always been a Windows user when it comes to the desktop.  So I approached the exercise as a chance to see whether or not I could accomplish my daily tasks on a Linux desktop.  So it was a kind of test.

My criteria for the test was simple.  There is a certain set of things I regularly use my laptop for and if Linux would allow me to do those things, then I'd consider the test a pass.  Otherwise, a fail.  I use my laptop for the following...

  1. .Net Development - While it's possible to do .Net development on linux using the tools from the Mono project, I didn't count this as part of my criteria.
  2. Email - I use Outlook, on Windows.
  3. Document and Spreadsheet authoring and viewing - Word and Excel
  4. Blog Reading - I use the RSS functionality in Outlook.
  5. iPod Syncing - I use iTunes and mostly for podcast downloads and syncing
  6. Web Browsing - I use IE 7
  7. Charging and syncing my Windows Mobile phone with email, contacts and calendar.
  8. Simple multimedia such as viewing videos and photos - Windows Media Player and Nero

Since it is so highly touted for the desktop and for its simplicity, I chose Ubuntu as the Linux distribution for my test.  I freed up space on my hard drive and left it unallocated.  During the install, I was able to tell the installer to use the largest block of unallocated space available and it took care of creating all the partitions needed by Linux.  The install went smoothly and without error.

When I booted Ubuntu, for the first time, I logged in and was presented with a popup balloon informing me that there were over 200 updates needing to be installed.  So , as I'm accustomed to doing on windows, I let the OS pull down all the updates available and install them.  I must admit, I was a bit surprised when I was presented with a popup, after the installs were completed, telling me that a reboot was required.

 After the reboot, I logged back into Ubuntu and started looking around.  I found the desktop to be somewhat familiar.  There is a recycle bin, a start menu of a sort and a task bar.  Looking at the start menu, I found a meager list of applications installed by default.  One of these is an application called Evolution.  I recognized it as an email client, opened it and started setting it up to retrieve mail from several accounts.  The application looks very similar to Outlook and felt familiar.  There is a junk email folder represented, so I found the configuration setting to enable filtering, but I could not get it to filter out any emails as junk.  I also missed having my RSS feeds available along with my Email.  I realize that I could have used Thunderbird as both an email and RSS client, but I also wanted to be able to Sync my Windows Mobile Phone and I had heard it was possible to do so with Evolution.

I found Open Office was pre-installed and It seemed to be adequate for the level of document editing I typically do.  Actually my greatest concern was being able to open documents that were natively created in Microsoft Office.  I found this to be a mixed bag where some documents with more complicated layouts, created in Office 2003, did not display correctly in OpenOffice.

Ubuntu comes with a nifty package manager called Synaptic which allows you to select new programs to install from a list and have them downloaded and configured for you.  The tool detects dependencies between packages and automatically selects them for you.  Of the many packages I installed, all but one ran without a problem.  I used this tool to download SyncCE and MultiSync which I had read would provide the functionality needed to sync my mobile phone with Evolution.  Once they were installed, I tried to get syncing to work, but it would not.  I ran some commands I found on the SyncCe project site and found that my phone, a Samsung Blackjack, was not supported.  Oh, well.

Now, I was curious as to what Linux had to offer by way of Multimedia.  I had some Divx video files I wanted to be able to view.  After installing and trying 4 players, I stumbled upon the VLC media player and it was able to play any audio or video file I had a need to play.  Now, If I could only find a way to Sync media and podcasts to my iPod...

I was disappointed to find that iTunes will not run on linux without some virtualization to run on top of.  In the search for alternatives, I found an application that would sync my desktop and iPod, another that would play media from my iPod and a third that could talk to the iTunes music store, but could not find one that did all three.

My conclusion, here, is that the Linux world is not ready for me.  That's not meant to be a knock on the OS, at all.  It seems, though, that software titles are just not pervasive enough for the Linux OS to meet my needs.  I could, perhaps, accomplish the same things by changing how I perform the tasks or my adding extra steps, but I'm all about getting things done in as few cycles as possible so I'm not about to go down that road.

Posted in: Linux | Desktop

Tags: ,

Low Friction Coding - Part 2

July 23, 2007 at 11:33 AMmgordon

Making it an even dozen.

  1.  Use Control Libraries - Not long ago, I was working on a rather complicated web UI I had envisioned.  For days, I tweaked the HTML and CSS to get the page to do what I wanted.  Most common and some not so common UI scenarios are easily implented with most any of the top control libraries.  Most allow you to change behavior with a line or two of code and look and feel with a single property.  The UI I had worked on for so long was later redone using a control library in less than a day.
  2. Use a Process - What do I mean by process?  You can save a ton of time by establishing, up front, how your development process or lifetime is going to flow.  What things have to happen and in what order?  Establishing this type of thing in advance allows you to flow from one task to the next without having to decide, on the fly, what do to next.  There are many well thought out processes to choose from (Waterfall, Agile, Extreme, SCRUM, etc)
  3. Use Convention - This is related to using a process in that you pre-establish things like variable naming conventions, source code repository structure and the layout of files in a project.  Again, it uses the principle of thinking through these things once and establishing how you're going to work so you don't have to pause and figure them out each time.
  4. Use Automation - Computers excel at doing repetitive and mundane tasks.  Stop and think of all the productivity suckers that you encounter regularly.  For example, when you've finished coding a project, you typically have to get the source code into source control, version it and package up the binaries and move them into an environment for QA testing.  Once testing is complete, the binaries may need to be moved to a staging or other environment.  Perhaps source control needs to be labeled or a branch created for this version of the application.  Continually knowing the state of your code is the most touted benefit to using a build server, but consider that it also automates most of the steps I outlined, above.  Once again, thing through things once (write the build script) and reap the benefits with time savings.  If you're not currently using a build server, take a look at Cruise Control.
  5. Know Your Language - Countless times, I've seen developers write tons of code to accomplish what could have been done much more quickly and easily with the correct language features.  Good productivity and how much you enjoy the task of programming are very much dependent upon how well you know the language. 
  6. Know Your Framework - The .Net platform has a framework as does Java.  Ruby has Rails.  Like the previous example, it's easy to get caught in the trap of writing tons of code when you don't have too.  Many times, ignorance of the functionality offered by a framework drains our time, productivity and sanity.  Spend some time getting familiar with what's available.  You never know when the knowledge will save you hours of frustration.

Posted in: .Net | Productivity

Tags: ,

Low-Friction Coding Part 1

July 2, 2007 at 5:29 AMmgordon

What is low-friction coding?  To me, it's removing as many of the barriers between you and getting a piece of code finished as possible.  There are many factors that can slow your progress.  Some of them are beyond your control (more on these in a later post) while others can be eradicated by working smarter - not harder.  Below is a list of things I do to make coding go smoother and faster and make it less of a burden.

  1. Code on Adequate Hardware - today's development environments (IDE) and tools use more resources than ever.  This means that coding on a machine lacking in resources is going to show up in a noticeable loss of productivity.  For me, it's normal to have two or more instances of Visual Studio open, to be running a local instance of Sql Server and IIS and to have other tools open to help me along the way.  These all consume a huge amount of memory.  For my development machine, 2 gigs is the minimum.  If you're developing for WPF or Silverlight, use even more memory and make sure you have plenty of graphics horsepower, as well.  Your code files load faster, compiles take less time and any tools or add-ins you may be using will be more responsive.
  2. Code Comfortably - I can remember, as a consultant, writing code at conference tables, elbow-to-elbow in a noisy room.  As far as I'm concerned, any distraction eats into my productivity and bumping elbows while being subjected to everyone's chatter certainly qualifies.  To the extent you can, wallow out enough room that you can work comfortably.  Familiarity also comes into play, for me.  I carry a mouse that I particularly enjoy using with me at all times so I can avoid having to use a mouse that doesn't work properly or comfortably.  Also, don't forget about ergonomics.  Achy body parts are certainly distractions, as well.
  3. Use Available Tools - Writing boiler-plate code over and over again won't make you any more productive.  Personally, I use CodeRush and Refactor! from Developer Express to help me get ideas into code faster.  CodeRush allows me to enter a few key strokes and get a template for a code construct entered directly into the code file.  This saves a few key strokes and time, but the time adds up during the course of a project.  Refactor! allows me to rearrange my code faster with tools that intelligently move code around without breaking it.
  4. Use Patterns - What's all the buzz about design patterns?  Simply put, there are a lot of software problems that continually get solved over and over again.  Why expend the time and effort to solve a problem that has already been solved?  I know.  It's tempting to not invest the time into learning even the most basic patterns.  Who has the time for that?  Truth is, once you learn a few and start using them, you'll recover the time you invested to lean them very quickly.  Spend some time at ootips.org to learn some of the basic, most used patterns.
  5. Use Code Generation - Most applications have similar requirements when it comes to data access.  In this area, there are proven best practices (though just what THE best practice is, is debatable) and generic approaches that we code over and over again.  Wouldn't it be nice if you could get this code, customized to your application, for free?  This was the promise that drew me into using SubSonic.  This tool looks at your database schema and generates business classes and collections that align with your database table structure.  The classes are database aware and can update, delete or add themselves into th database.  Cool stuff and there's no telling how much time this tool has saved me, to date.  Of course there are other areas of an application where code generation makes sense - maintenance screens, possibly parts of validation (data type, length and the like).  Whether you use available tools or grow your own, having code generate code certainly helps things along.
  6. Know What Your Writing - It should be common sense that you don't start coding until you know what your objective is and have, at least, some idea of how you're going to get there.  Still, many jump in and try to figure things out as they go.  Stop to think how many cycles are wasted with restarting from scratch or trying to fit code written on the wrong premise into an ever changing application.  I try to think through the entire portion of code I'm about to write, beforehand.  What pieces will I need to build?  How will they fit together?  What data will they exchange?  In what form will that data be?  Does this problem fit nicely into a pattern I've learned?  My objective in this exercise is to know enough about the solution to the problem that my actual coding becomes little more than just typing.  If I've settled things to the point that I'm not making design decisions as I go, I know my implementation will get from my head to code much faster and be much better code, to boot.

Posted in: Productivity

Tags: