Dec 19

I just started working on a software puzzle I had seen a few times on the T. I think I’m getting closer to a correct solution. If you haven’t seen it yet, you can check it out on ITA Software’s website. The basic idea is if you wrote out the numbers 1-999,999,999 (so “one” “two”…”fivehundredseven” etc.) then sorted the billion words alphabetically and concatenated them, what would letter number 51,000,000,000 be?

At first I thought it would be easy. But after spending a good 2 hours thinking and playing around with different ideas, I was kind of stumped. I tried some simple brute force methods but those would have taken a few days to solve. I also started writing my solution in C so I could kill two birds with one stone(learning C better and getting better at algorithms in general). But I was spending a lot of time looking things up so I switched over to C++, which I know a bit better. But then I again kept getting hung up on little things and wanted to get to the meat of the problem so I returned to my favorite Python.

My strategy is to write a recursive function that builds a list of the left most words(eight, eighteen, eighteenhundred etc) and adds the sum of the letters on their branches(you can reuse the count of the letters in branches for words like eighteenhundred and seventeenhundred, as they both will have identical trees extending to the right). If the desired sum is passed by adding the sum of a branch, I call the function recursively and dive into that branch. This way I’m alphabetizing the list as I go, and skipping the alphabetizing and counting of a huge number of words by relying on constants for those branches.

My problem right now is that the letter I get is in the middle of a number(it is supposed to be the last letter). I’m trying to figure out what’s wrong but after a good two hours of debugging I’m thinking of taking a different approach. My function has developed a whole lot of nested loops. Hopefully I can solve this soon and move on to the other two puzzles listed on their website.

I’m not sure if doing puzzles like this is the most efficient method to improve my programming skills, but it can’t hurt.

Nov 06

A few weeks ago I wrote a post about how I wish you could open a tab in a new window in Firefox. The problem is sometimes I have 6+ tabs open, and I want to launch one of them into its own window. It seems natural that by right clicking, this functionality should be present. But it’s not. So I wrote a post wishing it existed and saying I might attempt to write one. Apparently I’m not the only one that wants this functionality. I’ve gotten over 75 visitors to my blog in the past few weeks who have stumbled upon it via these keywords:

Pageviews Keyword
29 firefox open tab in new window
9 firefox open current tab in new window
6 firefox extension open tab in new window
5 firefox open tab as new window
4 firefox plugin open tab in new window
3 firefox addon open new window current window
3 firefox open same page in new window
2 firefox open current window in new tab
2 new windows to open in tabs +firefox
2 plugin open tabs
1 extension open tab in new window
1 firefox +open tab in new window
1 firefox extension open new window on tab
1 firefox extension open tab as new window
1 firefox extension open tab new window
1 firefox extension tab to new window
1 firefox extension tabs open in new window
1 firefox open curent page in another window tab
1 firefox open current tab new window
1 firefox open in new-window
1 firefox open same page in new tab
1 firefox open tab in “”new window”"
1 firefox open tab in new window extension
1 firefox open tab in new window?
1 firefox open tab into new window
1 firefox opens new windows over old ones
1 firefox plugin tab to new window
1 firefox+open same page in new tab
1 firefox~open same page in new tab
1 how to open same page in firefox in a new window
1 open current page in a new tab firefox add in
1 open current tab in new window firefox
1 open current window in new window in firefox
1 open links that open in a new window in firefoc add-on
1 open same new window in firefox
1 open same page in another tab in firefox
1 open tab in new window
1 open tab in new window firefox
So there is a demand for this plugin. Unfortunately, I don’t have the time or skills to write it(or to put it better, I do not have the skills to write this in the time I do have). So it will have to wait for now, unless someone else wants to meet this demand.

Thanks to Google Analytics for the insight.

Oct 29

In my first ever blog post I promised I would write about some tools I use in development. It’s about time I start living up to that. Today I’m going to write about SftpDrive. SftpDrive can save you 30 minutes a day and make your life easier. And you will notice results immediately. Really, you can download the free 6 week trial and notice results in just a little more time than it takes you to read this review. It is for Windows users only as of this writing, but a Mac version is in the works.

What is it? SftpDrive is a simple disk mapping utility. It maps an SSH drive to a Windows drive letter. Sound simple? It is. If you have a server, either at your home or pay for a dedicated or virtual dedicated one, you download SftpDrive, install it, and enter in the connection details for your SSH server.

What does it do? SftpDrive adds a drive letter to your “My Computer” screen. In my case, when I open up My Computer I see:

  • C: (my laptop’s hard drive)
  • D: (dvdr drive)
  • E: (sd card drive)
  • F: (hp recovery partition)
    And then the SftpDrives:
  • W: (SeeMeWin Server 1)
  • X: (SeeMeWin Server 2 - webserver)
  • U : (Qduke, Duke Startup Challenge, & other sites on my virtual dedicated server)
  • M: (internal SeeMeWin server)

So now I have access to all of my remote servers’ hard drives as if they were plugged directly into my computer. If you maintain websites, you’ll know how tedious it can be to manually download and upload files from your web directory. With SftpDrive, you open a file just as you would any file on your home computer, edit it, save and you’re done! No uploading or downloading.

Why do I love it? I love SftpDrive because it does its job so well! The concept and functionality are simple. Windows even has similar functionality built in(but Mapping drives on Windows does not use Sftp I’m pretty sure, just ftp). But nothing comes close to SftpDrive in terms of ease of use. You can set it up in less than a minute–literally. And it just works. I haven’t experienced one problem in the months I’ve used it. It has saved me lots of time and made me a much more productive developer. Also, because it has made secure, remote storage so easy, SeeMeWin now has an easy way for our team to collaborate using one file system.

Verdict: 9.5/10

Aug 28

while ($brecks_programming_skills < ‘great’) { write_learning_how_to_program_series(); }

I thought today I’d write my first post on programming. I have always been very passionate about computers, but to be honest my programming skills are embarrassingly weak. Mainly it’s because I haven’t spent any time developing them. Although I wrote my first webpage in 1996, it wasn’t until 2002 at Duke that I wrote my first computer program.

Until I took Computer Science 6 that fall semester in 2002, computers were still pretty much a mystery to me. Luckily that class was a complete eye-opener and advanced me light-years ahead to where I wanted to be. Well, almost advanced me light years ahead. Unfortunately for my programming skills, I spent the next four years enjoying life and learning about non-digital things.

Then during a trip to San Francisco in November of 2006, a number of friends, after discussing my career goals, strongly encouraged me to learn the technical stuff(thanks for the solid advice ya’ll, particularly Mareza). So I heeded their advice, and rather than enjoy my Friday afternoons during my Senior Spring Semester I learned how to count in binary, construct logic gates, and draw circuit diagrams in my first electrical engineering class. It wasn’t anything advanced, but it reignited my deep passion for the digital world.

It’s funny, now that I’m out of school, I finally have time to learn. I couldn’t be more excited to have graduated college and to have stumbled into such a great opportunity with SeeMeWin. Now I have all day to program and learn new things with a terrific team of smart engineers.

Besides learning on the job, I’m trying to spend time in new areas that normally I wouldn’t approach. Today for instance, I needed a break from the daily PHP grind today so I downloaded Eclipse(hadn’t used that since CompSci6) and started reacquainting myself with C++ and the whole “not-interpretted-at-run-time & statically typed” thing. Not a huge fan of C++ I must say. I know programs in C++ would execute faster, would probably be necessary in order to scale a high traffic site(unless servers could just be added), and there are a whole ton of cool libraries that can be used, but can someone tell me if there’s a good reason to spend much time learning something like C++? It seems between PHP, Python, JavaScript, and Flash, I can pretty much create everything I would need to create. And with the price of equipment falling, and the interpreters of these languages getting more optimized themselves, is there a good reason to learn C++ well? I know I’m probably wrong, so I’d like to defer to some people with more knowledge than I.

So after brashly deciding C++ was outdated, I opted instead to fiddle with Ruby. So far, I’m pretty impressed. Stay tuned as I expect to write my first side project with Rails sometime within the next month or two.

–Breck

(Not a very great post, I know, but good to set the bar low when starting a new series, that way it has lots of room for improvement.).