Category: Thoughts

I’m an inquisitive person. Maybe it’s because I’m an engineer, but I like learning about new things, whether they’re related to cars, computers or technology in general. So recently when looking through the logs of my Ubuntu server, I discovered many, many failed login attempts for users that didn’t exist. Since my system is accessible via the internet through SSH port 22, I get lots of attempts from bots, or less likely, real people.

In the past I’ve looked up the recorded IP address on the internet and found the offending location (or at least an approximation) but now, with my recent affinity for Python, I decided to automate the process and start a log. Using the free API service from, I wrote a Python script that runs hourly and parses the log file, looks up the location online, then stores everything in a MySQL database. Then I wrote a small PHP page to output the data to a browser in the form of the pretty maps and charts you see on this page. Now I can check the site occasionally and see where the activity is.

What does it all mean?

By looking at the map at the top, you’ll notice that most of the logins are centralized in the United States and eastern Asia. I can’t really say I’m that surprised.

The sample is made up of 352 attempts since February 2nd. You’ll see in the chart that the top 5 countries are:

  • China – 126
  • United States – 77
  • Republic of Korea – 32
  • Turkey – 18
  • India – 13

It’s an interesting list, and I’m curious to see how the numbers will change over time.

Additionally, here is a chart of the top usernames that the attempts had. Not really a surprise here, either. Obviously “attackers”, for lack of a better word, want to gain full access to a machine by using the root username, and most of the other names are for services that typical servers have running (eg. Oracle, mysql, postgres, etc.). What I found most interesting are the one-off attempts: brian, richard, fluffy, stud, gnats and taylour to name a few (really!). Top 5 once again are:

  • root – 255
  • bin – 21
  • nagios – 14
  • oracle – 9
  • test – 4

So what can you do?

If you must have an open SSH connection to the internet, there are a few things you can do to protect your system. There are lots of websites that describe the steps in more details (like this one, or this one or even this one. All of those sites share a few simple tips:

  1. Disable root access
  2. Use keys to access the system instead of passwords
  3. Drop the connection after x login attempts
  4. Use a non-standard port for SSH
  5. Enforce secure passwords

I follow a few of those, mostly because my system isn’t important enough to warrant super hardened measures. Even by disabling root access, you remove 99% of the threats, and requiring a key to log in removes the remaining 1%. I”m not particularly worried about users actually accessing my computer, and by following some of the measures above, that possibility is basically elimininated.

Update — September 23, 2012
A commenter requested the source code for the above system, so I’ve attached it as a zip file. It contains the Python script and web front end. I’ve written instructions as best I can, but please remember it’s a bit of a hack and therefore I can’t provide much support. Follow the readme and it should make sense.

Tagged with: , , ,

Wow. It’s been almost 12 full months since I wrote on these pages. Partly this is down to laziness, and partly a result of having too many cool things to do. Since I do enjoy writing and describing interesting things here, I want to make a point of writing on a more regular basis.

So what was I doing during the last year?

Here is a list of things I hope to write about in future posts.

Writing iPhone applications

Since the start of 2011, I’ve been working full time at a small mobile software company in Ottawa. We build mobile applications for iOS primarily, and are edging our way into Android to follow the rise of that platform. Applications are generally a mix of website companion apps, utilities and games, with a nearly even split between developing for clients and ourselves.

Our latest title, Tanks of Fury (win a Samsung Galaxy Tab!), is a colourful shooter with excellent graphics, hilarious sound effects and intuitive game play. Built with the Cocos2D framework, it was a excellent learning experience for combining graphics, efficient development processes and sound effects with the iPhone platform.

Despite not having any Objective-C and iOS developer experience prior to starting work, I was delighted at how easily I was able to pick up the language. Since I’m always looking for new ways to learn more, I decided to write my own apps and put them into the store. I previously wrote about one, and have had a moderate usage of about 1000 users. Shortly after, I came up with an application that would have been useful for my engineering studies, called Equation Library. By compiling many common equations into a directory and allowing users to solve for individual variables, I hoped to make it easier to do boilerplate math equations (engineering has a lot of that). Despite rushing the app into the store, I was shocked to see about 18,000 downloads in the first 48 hours! Part of this is likely down to its free price, but part could be that other people see value in it. Like this blog, I’ve somewhat neglected that app since releasing it, and hope to have a new, more useful version out when I have some time.

Overclocking my PC

Since having a little extra cash to put towards electronics, I’ve really taken an interest in DIY computer builds and tweaking. In fact, I’m writing this post on the computer that was the subject of my last post, building a watercooled PC. Since that post, I’ve made some changes to the setup of the computer, including overclocking it to 4.0 GHz. Although not strictly necessary, overclocking is somewhat of a badge of honour among computer enthusiasts, and is now gaining mainstream attention thanks to Intel’s latest chipsets and improved cooling solutions. I decided to leverage the superior cooling power of my custom fluid loop and bring the chip to a nice round number. So far so good.

Additionally I did things like adding a second GTX470 video card, more RAM, an SD card reader and added a third Reserator. That last part exemplifies overkill, but the way I see it, I’m futureproofing! Replacing my single 25″ ASUS monitor with dual 28″ HannsG screens has really made the space easy to work in. Maybe some screenshots and photos of the screens in action will be in a future post. In the mean time, check out this related post from Jeff Atwood on the benefits of using multiple monitors.

Adding MythTV to the Ubuntu Server

As a perennial digital tinker, I like to investigate and experiment with all of the interesting software available to a computer on 24/7. One of the most complex, but also most rewarding, applications is MythTV, the open-source DVR. I mentioned previously how getting it set up was a real pain, and the good news is that I’ve sorted through that. Now I have a MythTV setup where I can browse listings, schedule recordings and see system status from within a simple browser, using MythWeb and watch videos on a separate computer running XBMC. Using a simple coat-hanger-based antenna, I get one good channel in perfect HD, and a number of others if the wind is right. If I moved up to a commercial antenna, I bet I could get more. Right now, though, it’s nice to just be able to watch live and local TV whenever the mood strikes.

WordPress websites

Over the last few months, I’ve started doing some additional website work with my sister, who resides at Through various channels, we have 4 or 5 projects ongoing, which are visible in the above image. To take a look at one of the currently live websites, visit, and look for more links in coming posts.

Each website so far has been based on the WordPress platform, which has allowed me to become more efficient at building administration panels and custom themes. In fact, the more I’ve used it, the more I’ve come to appreciate its simplicity and adjustability. Hopefully I can apply this new knowledge of the WordPress API to updating my plugins in the very near future.

GoPro Camera

I’m a big fan of the GoPro camera. Not necessarily because I’m an adrenaline junkie, but more for the way it does a single job exceptionally well, and packs a lot of tech in a very small footprint. Once you recognize them, it becomes a game to point them out in regular TV shows, sporting events and online videos.

I bought the GoPro HD Hero camera in the summer of 2011, with the intention of using it for driving videos mounted to my windshield and for snowboarding. So far I’ve captured some cool time lapses while driving across Ontario and interesting pool footage. Recently, however, I was able to put it to a stiffer test, where I used it while snowboarding at Mt. Tremblant, QC. In fact, here’s a YouTube video my sister put together about it. Most of the video was recorded while the GoPro was mounted to a custom camera pole mount (read: wooden dowel with a cable loop) so I’d like to write a future post about how to make your own, along with a fishing line camera tether. Hopefully I don’t ever really need to test the tether, but it’s at least a bit of piece of mind.

3DConnexion SpacePilot PRO

This device brings me back to engineering. The present and future of product design and testing is done inside a computer, using design suites that handle full 3D representations and analysis. To work more efficiently, many engineers swear by left-handed 3D mice. Built by Logitech subsidiary 3DConnexion, the SpacePilotPRO includes the largest feature set of any similar mouse. I purchased it for developing my skills in CAD programs like SolidWorks, AutoDesk Inventor and even Google SketchUp. It also works in applications like Google Earth, which allows it to provide a unique interface for zooming in and out through space.

So far it has proven its worth while helping me learn about SolidWorks’ analysis components. The control knob provides fantastic 3D manipulation and the buttons are laid out smartly to provide instant access to any application more common features. It’s true that it takes some time getting used to, but it can provide a 20-30% productivity boost once integrated in the workflow.

So that’s what has happened in my last year, relating to technology. Look for more detailed posts in the coming weeks!

Tagged with: , ,

I’ve been looking forward to writing the post for this project. It may seem that I’m exclusively a Mac user, but my time inside operating systems is probably split 60, 30 and 10 in Mac OS X, Ubuntu and Windows environments, respectively. Mac OS X is obviously my primary platform, but I use the other systems in the area of their strengths. For Ubuntu, that means running my 6.75TB file server and Windows 7 is running some engineering applications and games.

The proportion of the second two OSes will increase dramatically with this project.

Back in September I decided that I wanted to build a super powerful desktop computer running Windows 7, and maybe even Ubuntu. So over the last 4 months I’ve been steadily buying parts to facilitate the goal, and the computer has finally booted. What follows is a description of the process I took, which you can also follow on this [H]ard|Forum thread.

Choosing the Parts

I choose this motherboard on the recommendation of a friend, who has been using the same one for a number of months. In addition, I liked the USB3.0 connectivity, compatibility with Intel’s upcoming 6 core CPUs and triple SLI for the future. So far I have yet to be disappointed.

I choose to go European for my waterblocks. These are from Slovenia, by a company called EK. They are well regarded in the water cooling community for their high quality. These blocks cool the chips on the motherboard surrounding the CPU, and reduce fan requirements for the case to essentially zero.

For the CPU and VGA blocks I chose Germany. AquaComputer makes all of their blocks in house, and ship worldwide. If you ever decide to order from them, try to find a local friend who can split the shipping, because it is a flat rate regardless of order size.

Choosing the graphics card is a super important step for building custom PCs. It has to provide the power to do whatever you want in the near term, but also give you room to grow into whatever application you need later. For those reasons, I bought what, at the time, was the second most powerful graphics card NVIDIA produced (they’ve since released the GTX5xx line that has rendered my choice obsolete). Hearing horror stories about power requirements and temperatures under load, I was relieved that I would be watercooling this chip, which should prevent it from burning through my case.

Speaking of cases, the Corsair Obsidian 700D provides an expansive space to insert every computer related gadget you’d ever need. In fact, the case is so large it hardly fit inside my car. The 700D is the slightly less expensive brother of the super awesome, and similarly sized Obsidian 800D. That case primarily adds a side window and 4 hot swap bays on the front faceplate. I decided on the 700D because I needed that front real estate for my fluid filter. Currently I’m looking for an 800D side window so I can gaze at the work I put into plumbing the internal system.

Not shown are the rest of the parts that are required when building a custom PC.

  • Intel i7 950 Socket 1366 CPU
  • 6GB G.Skill DDR3 RAM
  • 120GB OCZ Vertex 2 SSD
  • OCZ 850W Power Supply
  • 500GB Western Digital Caviar Black 3.5″ Hard drive
  • Generic ASUS DVD-RW

I chose these parts while searching for the best value available at the time. They should provide enough power for any application I might want to run in the upcoming years.

Modding the 700D

Installing the fluid filter into the case required opening a hole in the front aluminum faceplate and steel chassis structure. So I pulled the Dremel from the closet and went at it. It’s a loud, dirty job, but persistence paid off as I slipped the filter into place.

With the aluminum cover in place, the mod is complete.

From the other side, however, the job is slightly less clean. The tolerance was such that I had to use elbow fittings from Koolance to direct the tubing away.

Final Assembly

With the motherboard installed in the case, I ran tubes from the in hole in the case, to the filter, and out through all the blocks on the motherboard. Inside the case the loop runs filter to CPU to graphics card to Northbridge to mosfets and out. I used standard Koolance barbs and fittings on the G1/4 threads installed in each of the blocks. The tubing is 3/8″ ID 0.5″OD tubing from Home Depot. This diameter provides plenty of flow and is easy to connect to the variety of parts in the loop.

For measuring vital stats about in and out temperature as well as flow rate I bought and installed an Aquaero v4.00 from AquaComputer. Connected to it is a collection of sensors including 2 thermocouple water temperature sensors and this high-flow flow meter. It is calibrated to tick at a precise rate for each litre of fluid passing through, and the calculated flow rate is displayed on the Aquaero LCD screen.

I swapped the air cooling heatsink on the GTX470 for the waterblock and installed it into the chassis. It adds weight to the card, but slims the profile down significantly. It is definitely an improvement over the regular air system.

The motherboard blocks were next. The ASUS board used 4 individual heat sinks connected via heat pipe to cool the voltage regulators and associated chips. Those were replaced by 2 mosfet blocks and a single northbridge/southbridge block.

To cool the water flowing through the system requires a radiator and reservoir. I decided to use a now out of date product from Zalman called a Reserator. As shown by the name, this is a combination of reservoir and radiator. Essentially an extruded aluminum cylinder with fins, it has a 2.5L capacity and cools the fluid as it flows from top to bottom. I used two because of the significant heat my computer would be putting out. Both were sourced online from eBay and Kijiji. Interestingly, the Kijiji model was the only one available on the site, and was 10 minutes from where I was at the time. By buying used, I saved approximately $350 combined, which is the cost of a single brand new unit.

Pushing the fluid through these blocks is a generic aquarium pump that was bought primarily for being available at the time I was in the pet store. Rated for 350GPH at zero head, my system produces 50L/hour, which means together the loop has a head of approx. 10-11ft, based on the pump chart. I started with a 24 hour leak test, and the pump has been running perfectly since then.

Not mentioned a lot here is the choice of coolant. I’m using Feser One dielectric fluid instead of water with additives. The Reserators I bought were both encrusted in a blue film as a result of using these additives, and dielectric fluid presents fewer risks to the electrical components in the immediate vicinity. Originally I had 4L in the system, but immediately learned that was not enough when air bubbles were flowing through. I added another 2 and the air bubbles have stopped.


So what have I gained from all this and why bother watercooling in the first place? First, this is a very powerful computer system. In the brief bit of testing I’ve done so far, frame rates in StarCraft 2 hover at about 100 during most of the game, and any other FPS game I’ve played has done so without pause. For gaming and eventual 3D CAD work, it will be a capable machine at least for the next 3 to 4 years. For that power, and the ability to upgrade parts as they require, this has been a great success.

This screenshot I think captures most of the success. I have very little place to go before I reach that magic 7.9 peak. The best part is that with all of this power, the system itself is nearly silent. The case fans I do have are near 35% power to slowly cool the single platter-based drive I have inside, but for the most part I hear nothing. That is the payoff to watercooling. Though getting the parts together and in the same room was rather costly and annoying, once everything is set up there is minimal maintenance and system I’m using should give me room to overclock and upgrade equipment down the road.

For most people, however, watercooling is maximum overkill. In fact, I’m fairly certain watercooling remains popular in maybe 5% of the computer using population. The cost is often a prohibiting factor, but time and energy are key as well. For a custom system like this, you’re looking at spending an additional $400-$500 above whatever you spend on processing parts. Though out of the box systems like Corsair’s H70 can make cooling a CPU more cost effective, you’ll still need to think through every other part to get the results you need. As an engineering graduate, I enjoyed the research into parts as much as putting everything together, so I’m curious what other performance I can get out this setup.

Part 2 I will be sharing more results of experimenting with cooling parameters and overclocking. Would you consider watercooling? Let me know in the comments.

Tagged with: , , , ,

I generally modify my computers with new hard drives and additional RAM after purchasing them. I added RAM to my iBook and replaced the HDD in both my MacBook and MacBook Pro. I bought a 250GB Seagate drive for my MacBook back in 2008 sometime and used it inside my MacBook Pro when I bought it in December 2009. I had no problems with it during that time. I installed Boot Camp, did 200GB+ backups and it didn’t hesitate.

A few weeks ago I closed the lid on my MBP to do some other work, but when I came back to it, I got the password authentication screen and the machine stalled. I left it be for a few minutes, but clearly something was wrong after 20 minutes. Forcing a shutdown, the machine booted to the grey loading screen and no further. That told me something was definitely wrong, so I went to the MacRumors forums and posted a message about the Blank Screen of Death that has afflicted many other MBP owners. During this time I also removed the HDD from the MBP and installed it into an enclosure for use with another MacBook. When it didn’t mount, I started to get more nervous, and the obvious beeping of the drive did not help. So I admitted defeat and prepared to purchase another drive the next day, which I did.

After taking the drive into a data recovery service just for an evaluation, it turns out the drive had seized, and a repair was likely to return all my data, but at the minimum charge of $500. Since I had already rebuilt the website data I had lost and most of my applications were on my 2 week old backup, I’m going to take a pass on the repair.

This entire event has taught me a number of things that I’ll outline here.

  1. Hard drive failures are inevitable
    It really isn’t a case of if, but when. Especially in a laptop, where the fragile spinning components are tossed and turned and operated at weird angles. Be prepared.
  2. Backup regularly
    Buy an external drive, and either use Time Machine or other cloning software to create regular backups. I lost all of 1 website, most of another and a few photos from a trip. The websites I’ve since rebuilt, but if the other data had been mission critical, I could have been in big trouble.
  3. Check your backups
    I use Carbon Copy Cloner to build images of the drive and store those on my Ubuntu file server. In the process of retrieving some after replacing the drive, the image would not eject, then would not mount due to a corrupt file system. It worked out after rebooting, but was a cause for concern. Be sure to check your backups often to make sure they are updated as expected.
  4. Double check drive reliability
    I probably have more than 8 hard drives in my possession right now, and most are Western Digital. Of the drives I’ve had fail, all are of the 2.5″ variety and only 1 is WD. I believe I will be purchasing WD drives for the near future (my replacement drive is a 320GB Caviar Black). Before buying a new hard drive, especially for laptops, research reliability data for various manufacturers to see if there is more satisfaction with particular vendors.
  5. Data recovery is expensive
    My $500 is the starting price of recovery, which I received because the firm believed I was a student. Many recoveries reach far higher, due exclusively to the manner in which data is recovered. If the repair is straightforward, the cost is far lower than if it requires extensive reconstruction. If your hard drive ever dies and you need recovery, prepare the platinum card because regardless of data volume, you’ll be paying a lot.
  6. Consider drive upgrades regularly
    You have no way of knowing which drive will stop after 3 years or 8, but after this latest drive death, I will be upgrading storage every 2 years or so. Once SSDs are more cost effective, I’ll move to those (which brings their own problems) but I think the key to reliable storage is fresh media.

Data loss is no fun for anyone, but with the right safety measures in place, you can come back from the loss with minimal downtime and lost material.

In March 2010 I took part in a ceremony that all engineers go through once they complete their undergraduate degree in Canada. Called the “Ritual of the Calling of an Engineer“, it serves as a basis for remembering what engineering stands for and how an engineer’s work affects the public. It was written by Rudyard Kipling in the early 20th century to remind engineers of the obligation they have to work that is safe, efficient and ethical. During the ceremony, each graduating member is given a ring made of stainless steel or iron that is worn on the pinky finger of the dominant hand. This is to serve as a constant reminder of this obligation.

It was an interesting ceremony, to say the least, and is one that I will remember for a long time. It was a very nice way to both prepare for a future career and to commemorate the last 4 years of studying. Officially, in June I will receive my degree in Mechanical Engineering, and after registering with Professional Engineers of Ontario, I will be an EIT, or engineer in training. This means that I can begin to work under a fully licensed Professional Engineer and collect experience that is required to receive P.Eng certification.

Since jobs don’t come overnight, and I’d like to enjoy the summer a little bit, right now I’m not focusing that intently on my full-time job search. Instead, I’m using some of the skills I picked up during high school and university related to website development. Right now I’ve joined a site called that connects people looking for results with providers of services. So far I’ve been able to help a few people around the world by building some WordPress plugins to improve their site’s functionality. These include one to display popular tags in the last few posts and another that gives users the ability to vote on photos displayed on posts. Additionally, I’m also working on a number of other websites for friends and family. I currently have about 4 projects of various sizes and complexities ongoing, and most use WordPress as a backend so I’m getting pretty comfortable creating themes, plugins, administration panel pages and interacting with the WP database. Check out for the latest project to start up.

More related to engineering, I’m also spending time contributing to our university’s Formula SAE team. As a member of the drivetrain team, I did some work looking at the best differential, sprocket, half shaft and spindle combination to get the most power out of our Yamaha R6 engine. I even got to do some design work, using SolidWorks to create a 3D model of a specific part, test it with the simulation software and then have it sent out to be machined on a CNC mill. It’s very cool to see something built inside a computer become a real part.

In May, the team took the car to Michigan International Speedway where we participated in Formula SAE Michigan 2010, a competition between universities all over the world to see who can design, build and market the more cost effective and highest performing race car. Unfortunately the team ran into some scheduling issues during the school year, when students — rightly so — focused on school work rather than building. Since this is the first of 3 competitions during the summer (I’m hoping to get to California and England later), we took what was built on the car and learned as much as possible. It was very interesting to see what the other teams had done with their time and budgets.

With all that in mind, it’s easy to see why my last post here was a few months ago. I hope to write more in the coming weeks, as I will hopefully have some time to work on projects that can be shared. Engineering is a challenging field of study, but it is very rewarding in both education and contribution to society. Finishing my program and learning more outside of school has helped me realize that I’m in the right field and that the sky isn’t even the limit.

Tagged with: , , , , , , , ,