Earlier today I decided to start working on yet another side project, this time written in C++. Before I get into the meat of this post I thought I’d mention that I reinstalled my dev environment for C++, I use the MinGW port of the GCC for my compilier and would like to mention that the work they have done on their package manager mingw-get is really awesome it allowed me to get MinGW and MSYS up and running in no time with very little effort.
Once my dev environment was all setup again I went to set up my project only to find that somewhere along the way I had lost my generic all purpose Makefile, so after taking a little bit of time out to re-teach myself how to write a Makefile – from the best source that I know of – I recreated a makefile very similar to my original generic makefile. In an effort to not lose it again I thought I would share it with the world:
To use this makefile you will need to run it from a POSIX like environment so it should work fine on Mac OSX and Linux but on Windows you will need something like MSYS or Cygwin, personally I use MSYS but that’s just a preference thing.
This makefile is intended to be a drop in start point for any C++ project, though it isn’t had to modify it for other languages. The following is the project structure that the makefile is designed to work with:
Project Root/
makefile
src/
source_file1.cc
source_file2.cc
subfolder1/
source_file3.cc
subfolder2/
source_file4.cc
source_file5.cc
It will pickup all of the source files in the subdirectories eliminating the need for a recursive makefile. I have never tested this makefile on a large project so I don’t know how well it would hold up, but I’m guessing if your project is getting big you would most likely be better off using something like Autotools or CMake.
At work we do a bit of web development using ColdFusion and earlier this week I got stumped by a problem which I thought I would share. We are currently working on a RESTful API which requires an API signature similar to how flickr does. When it came to writing my unit tests I created a signature grabbing a private key out of the database to test against. I ran the test and BAM! it failed, now this was half expected it was the first time I’d run the test. So it turned out that the code was syntactically fine, then I thought maybe I had made a mistake in the process of creating a signature.
With that ins mind the next step I took was comparing the raw pre-hashed version of both signatures, to my surprise I found that the test passed. This was beginning to not make sense, it wasn’t until I altered the test to fail that I saw what the issue was: when I retrieved the key from the database all of the characters were uppercase however when coldfusion retrieved the key all of the characters were lower case. After updating the test to use a lower case version of the key it passed successfully.
So it turns out that ColdFusion is not case sensitive when it does string comparisons, but the hash function does care what case the characters are, as you can lead to a frustrating situation. Now I’m not expecting you to take my word for it so I have quickly coded up some example code showing the issue.
I found that for me this weekend is going to be a bit of a quiet affair so rather than sitting around all day doing not very much I decided that I’d try to be productive. It’s been a while since I sat down and done any meaningful amount of coding for myself so I thought that is where I’d start, my next question was what do I want to write? I then remembered that I’m not overly fond of most of the music players that I’ve tried on Windows, the closest so far to something I find acceptable is iTunes. With that I had it: my goal for this weekend would be to write (or at least make a dent in writing) a music player that I would like.
Alright, that’s all fine and dandy to say but what does that actually mean? Brainstorming it I came up with seven key features that I want in my media player:
Only plays music, doesn’t try to do anything else.
To implement this I’m planning on using C# and WPF, I haven’t had a good chance to play around with WPF or some of the new Windows 7 features that are available so I figured this would be as good a time as any. Finally my other goal with this project is an attempt to get me back into blogging, to that end I will hopefully be making a post at the end of each day summarizing what I’ve done – possibly with some screenshots. Until then I should be posting some updates to my twitter feed.
So it would seem that I might be starting to go a little theme happy. Not one week after releasing the new theme to my own blog I’ve tried my hand at another theme. At work we are gearing up for the release of theCloud our hosted services platform and I had the pleasure of designing the blog theme that we are using for theCloud blog which was launched yesterday there over the next little while you will be able to find posts related to hosted services, cloud computing and other related topics. I’m hopefully going to try and squeeze in some posts about customising the software we have available through coding.
If you have actually browsed to the site to read this post you will have noticed that Mike’s Musings has had a fresh coat of paint, also if you’ve read my previous entry you will have noticed that it is not the theme that I mocked up. In the end I thought that the first theme was not a good fit for the site, though one day I might turn it into a real theme.
The motivation for changing the theme in the end came down to a mixture of the following factors:
Fluid Blue the old theme had been in service on this site for getting close to four years now and it was time for a change.
I wanted to try my hand at a bit of design, I knew it was not going to be any hugely fantastic but I’m happy with the result.
Finally I wanted to integrate some of the various social networking sites that I belong to into the site, I found that fluid blue didn’t really lend itself to how I wanted it all displayed.
As I noted above I wanted to integrate some of my social site activity into the site to that end I have also integrated my twitter stream into the left sidebar. As with any new piece of code I will not be surprised if there are bugs, I have tested it in IE 8, Firefox and Chrome and it appears to work fine but these are not the only browsers in the world. If you do happen to find anything wrong with the site don’t hesitate to report a bug over at the mlowen.com bug tracker.
In June of 2009 I left my first programming job to move to LayerX, it’s been roughly six months since the switch and I haven’t looked back. One of the biggest changes in the switch over that I wasn’t expecting to be so big was moving from Linux to Windows as my primary development environment I had not realised how many of the small apps that shipped with Ubuntu that I relied for my day to day work. It’s only been just recently that I felt that I’ve settled into windows development enough that I am no longer swapping and trying out new tools. As my first post for the year I thought that I would share the list of tools that I currently use often.
In this list I am trying to avoid major tools (like an IDE) and rather focus on the small language agnostic tools which makes my day to day life just that little easier.
Notepad2 – This is just a simple text editor, what puts it above the notepad that ships with windows is the syntax highlighting that it provides for many
Putty – While my primary development environment is no longer Linux I do still need to access various Linux servers and putty is still the simplist and most light weight tool for the job.
WinSCP – This is yet another tool for dealing with linux servers, getting files off of a linux server (lacking samba) onto a windows box can be a PITA and that is where this tool comes in to save the day it makes retreival of files from linux machines a breeze.
7-zip – I can not stress how much I love 7-zip or how lost I’d be without it. Able to uncompress every compression format I have come across so far, you no longer have to fear others sending you files compressed in formats which are not zip.
Balsamiq Mockups – I think this is damn near the perfect tool to create mockups to show to clients, the sketched feel to them seems to strike the right balance between looking somewhat professional and not looking like a real application.
TortoiseSVN – This seems to be the svn client for windows, with it’s integration into explorer it is easy to see why.
IcoFX – A simple easy to use Icon editor, it can be used to create Icons from scratch or transform existing images to icons.
InnoSetup – Distributing an application and want an easy to use installer? Then InnoSetup is the tool for you.
Console2 – I do not like the standard windows command prompt window at all. I have my reasons and half of them can probably be solved quite trivially, the point is the shouldn’t have to be. The ability to have multiple tabs of different types of consoles in one window is great.
Sqliteman – If you deal with SQLite databases then you need this tool, it lets you get into the database and examine and manipulate the data contained within.
MSBuildShellextension – This is a neat little tool I only discovered recently courtesy of the 2009 Hanselman tool list. My life is a little bit brighter now I can build VS projects from explorer without having to launch Visual Studio.
Is there anything you feel that I might of left out? Or do you know or better alternitives to some of tools listed above? If so leave a comment so I can look into them.
One of the things I enjoy most about being a programmer is the fact that when you can’t find a tool to do what you want you can write it yourself. Generally I’ve found that these applications tend to be quite simple and stick to the unix philosophy of ‘do one thing and do it well’ which as a software developer I think is a good philosophy to live by. The most recent occurrence of this happening to me was at work not to long ago where we are currently writing a REST API I needed an application to make a HTTP call to a URL. After about 5 minutes of looking around the web I couldn’t find anything, at that point I had the choice of either continuing to search for an appropriate tool or I could write my own. As you might have guessed I wrote my own, it took about 10 minutes to implement the basics of what was needed.
Over the next couple of weeks the tool continued to evolve to better fit the specifics of the project we we’re working on, but in the back of my mind I kept going back to how other people must have this problem as well. Eventually I decided to re-implement the core of my tool. Having finished the re-implementation a couple of weeks ago I’m finally getting around to releasing it to the public under the GPL, below are the links to download the 0.1 release.
[download id="1"]
[download id="2"]
For those of you who would like to grab the latest source and stay current with any updates (which may be buggy broken code) you can check out the subversion repository which is available at the following URL:
In other news I have signed on to be a contributor to lounge media a blog about digital media in the home, hopefully I should have a post up there soon – once I figure out a good subject to start on.
So lately I’ve been doing little to no work on gIDE, which while it is not unusual it is a little disappointing as I had hoped to have made at least one release by now. With that in mind and the fact that I don’t have anything planned for this weekend I sat down and listed all of the features that I needed and wanted to have before I made an initial release. The plan is to sit down this weekend and knock as many of these things out before the weekend is over and make a release, will I hold true to this? I do not know, my track record of promises similar to this (which you should be able to find in the archives of this blog) is not stellar. Heres hoping I follow through on it this time. Now onto the important part of this post the lists:
Of the things that is on these lists the one that I am not really sure about is the moving from vte to vtem, while vtemm would fit in better with the rest of the application it is currently not packaged with any of the major distros. This leads to the problem which is more important the design of the application or the ability of people to run the software? I’m sure I will have some comments about this in the next couple of days.
All going well I should hopefully make a blog post after I finish each feature, or for a couple of less screenshot worthy features I might just save them until a screenshot worthy one is finished before making a posting.
Close to a month ago now I wrote about what I got up to on my holiday and I said I had started a new project Cuttlefish – a syntax highlighting text box for .Net. I also said that I would post about in more depth later, so far that hasn’t happened. This is mostly because I haven’t actually finished cuttlefish and I haven’t a lot of time to code lately. The other big reason is I recently picked up a copy of Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries and found that my little project needs a quite a bit of refactoring to be compliant with these guidelines. I hope to get started on the compliance work tonight, once that refactoring is done it shouldn’t take to long to finish it off. With all that in mind it hopefully won’t be to long before I am able to show cuttlefish off.
I’ve been back at work a couple of days and once again settling back into the daily grind. I had originally decided to make a series of posts once I got back from holiday called ‘Holiday Hacking’ which would detail the coding that I got up to during my time off, as it happens there was just one small hitch in that plan – I didn’t do much coding in my time off. It would seem that I choose to relax these holidays rather than try and chip away at my to do list for gIDE. While I didn’t work on gIDE this holiday I did however start a new project: Cuttlefish. I plan to go into this in more depth in a later post so for now just let me say that it is a syntax highlighting Textbox component for .Net written in C#.
I have been doing a little bit of work around the site as well, mostly involving integration with my facebook account (which I’m intending to give more attention to this year). For those that haven’t noticed (or read this via rss) a link to my profile now appears in the in the sidebar and all of my posts should hopefully be appearing on said profile. This has the added side effect of some of my friends who hadn’t noticed it before get to see how truly geeky I am. For those who are interested the two plugins I am using for the integration are Wordbook and Facelook.
Follow Me