 Sunday, October 28, 2007
Well, ever since I won the Zune at CodeMash 2007, I have been listening to a lot more music in my car. Well, when I had the 6-hour drive to Washington, D.C., in August to go to the Agile Conference, I thought I might enter the 90's (or is it the 80's) and start listening to books on tape. Well, after searching around the internet for a good source (read: lots of selection and cheap), and I was astounded. What is up with charging $20 for a downloaded book. UGH! Deciding to make lemonade, I started searching for podcasts to start listening to. There were, of course, the standard ones like Hanselminutes and .Net Rocks (which I don't listen to as much anymore), but I found two other really great ones: Astronomy Cast After seeing Lawrence Krauss in August, my interest in astronomy was re-kindled. So, I went looking for something to listen to. What a stroke of luck that I stumbled upon AstronomyCast. The hosts are Pamela Gay, a physics professor at Southern Illinois University Edwardsville, and Fraser Cain, the publisher of Universe Today. I love how they describe the show as a "fact-based journey through the universe." They strive to not just explain what we know, but also HOW we know it. This is important, as they discuss topics such as The Big Bang, Dark Matter and Dark Energy. It is very educational for me to understand what the lines of evidence there are for these. Of course, everything seems to always point back to the Cosmic Background Radiation, which is pretty cool. Also, as an added bonus, Pamela Gay has one of the sexiest voices I've ever heard. My History Can Beat Up Your Politics Bruce Carlson does a great job of taking current political issues and topics and presents them in light of 200+ years of history of the American government. I like his direct approach to giving the facts, as well as linking the probably cause and effects over time. I love early American government history, and it is great to have a source for understanding some of the historical reasons for where we are today.
 Wednesday, October 10, 2007
Well, I'm heading to Manhattan on Friday to attend my very first XPDay. Mary and I are leaving on Friday and coming back on Monday, so I've got to figure out some stuff to do on Sunday and Monday. I've not been to an XPDay before, so I'm very curious to see how it will be. I'm staying at the Intercontinental Barclay. I got it on Priceline, so we'll see how it is. I haven't booked a hotel reservation on Priceline before. I'm just chock full of conferences; I got back from Agile in August, am going to XPDay in October, going to SDTConf in November, then finally CodeMash in January. Hurra! I definitely get a lot out of these conferences, so I'm always excited to go.
 Saturday, September 29, 2007
Well, trying to write what I think (not that I know anything about it) is more Ruby-ish code, here is a mixin for the Array: class Array def mergesort return self if (length<=1) half = (length-1)/2 firstHalfOfTheList = slice(0..half) secondHalfOfTheList = slice((half+1)..(length-1)) sortedFirstHalfOfTheList = firstHalfOfTheList.mergesort sortedSecondHalfOfTheList = secondHalfOfTheList.mergesort merge sortedFirstHalfOfTheList, sortedSecondHalfOfTheList end def merge(first, second) merged = Array.new firstlength = first.length firstlength.times do fp = first.shift secondlength = second.length secondlength.times do sp = second.first if sp < fp then merged << second.shift end end merged << fp end merged + second end end
I went to the Pittsburgh Coding Dojo last Thursday with my friend, Nate. It was a lot of fun. The topic was sorting, specifically the merge sort. I decided to write it in Ruby, since I'm working on learning the language. In any case, Greg Akins said that it looks like when he was writing Ruby, and people would say that it looked an awful lot like C# in Ruby. In any case, here's the first pass (complete with rspec tests). I'm going to turn it into a mixin for Array. class MergeSort def sort(list) return list if (list.length<=1) length = (list.length) - 1 half = length/2 firstHalfOfTheList = list.slice(0..half) secondHalfOfTheList = list.slice((half+1)..(length)) sortedFirstHalfOfTheList = sort(firstHalfOfTheList) sortedSecondHalfOfTheList = sort(secondHalfOfTheList) merge sortedFirstHalfOfTheList, sortedSecondHalfOfTheList end def merge(first, second) merged = Array.new firstlength = first.length firstlength.times do fp = first.shift secondlength = second.length secondlength.times do sp = second.first if sp < fp then merged << second.shift end end merged << fp end merged + second end end describe MergeSort do def check_sort(list) s = MergeSort.new result = s.sort list result.should == list.sort end it "should return empty list if empty list passed in" do check_sort [] end it "should return the same list if the list is ordered" do check_sort [0] check_sort [1] check_sort [1,2] check_sort [3,6] check_sort [3,6,9,20,100] end it "should sort a two element list" do check_sort [2,1] end it "should sort a four element list" do check_sort [1,0,3,2] end it "should sort a six element list" do check_sort [1,0,3,2,4,5] end it "should sort a three element list" do check_sort [1,0,2] end it "should sort an eleven element list" do check_sort [3,6,2,8,23,45,1,36,77,99,10] end end
 Tuesday, September 25, 2007
Ever want to see Jesus kick the shit out of Noah? Here's your chance: Bible Fight.
 Sunday, September 23, 2007
You know, I sure get a lot of receipts. These end up cluttering up the back pockets of my pants, finally (almost always) ending up in the recycling bag at home. Here's the problem: I rarely, if ever, look at most of them. Why do I have to get them? Starbucks and the Cinemark at Valley View ask me if I want a receipt. I always decline, and I can see that the receipt is never printed. This should be the default for the majority of purchases, which I don't expect to take back, especially when you are purchasing things that you can't take back (movie tickets/food, starbucks coffee). When I purchase something large, I will keep the receipt as a proof-of-purchase in case I need it. I wonder how you could go about getting the lack of a receipt to be the default.
 Saturday, September 22, 2007
A new beta version of switcher has been released. If you use Windows Vista, switcher is a MUST HAVE! Here are a couple super cool things: - numbered windows; - incremental window search (just hit win-tab, start typing gmail, hit enter, and the gmail window is open). Go get it!
 Thursday, September 20, 2007
I was listening to the dotnetrocks show today with Steve McConnell. It was a good show (not only because Carl Franklin kept his trap shut and let Richard Campbell conduct the majority of the interview), and Steve had an interesting comment about a watershed moment when he joined IEEE: he realized that there were other people out there that had worked on the same stuff he had. This got me thinking about these sorts of moments in my own life. So, I thought I'd write a couple down. Perhaps anyone reading this might want to add their own stories? Other people write databases? When I was 15 or 16, I was in the rapture of learning C/C++. This was a significant step in my life, as I really started discovering the true joys of creation and what it feels like to construct something from nothing. Well, one of the first things that I completed was a calendar program. It was super sweet, allowing you to save entries on a specific day, then an entry in the autoexec.bat would allow you to have a reminder posted when you turned on your computer. Yup, autoexec.bat. This was probably in 1989, DOS 6.22 days. I had also found a cool library (one of the first explicit third-party libraries that I found) that allowed me to do some pretty cool ASCII graphics for the calendar and dialogs. Well, in order to save/update/remove the entries, I had to have somewhere to store them. So, I wrote a simplistic flat-file storage system. I didn't realize it at the time, but I had actually built a small, indexed, relational database. If memory serves, it consisted of about two or three files, including an index file that provided the indexes for day to entry. It was definitely a flat-file, as I remember having to keep the index file updated with the byte offset and length of the entries. I remember that I had one problem that I wasn't really satisfied with my solution for: deletion. I don't remember exactly how I did it, but deleting an entry was a complicated process to get it out of the file and the index. At the time, my mother had a friend whose husband worked at Microsoft. I don't remember what department or project, but that isn't really relevant to the story. Knowing that I spent so much of my time programming on the computer (for Christmas, I had only asked for a single thing: TurboC++ 1.0, now with an MDI), My mother had set up an onsite meeting/tour of Microsoft for me. Well, I remember walking around the Microsoft campus in a bit of a dream-like state (the drinks were free and ice cream was free in the cafeteria). My mother's friend and I had lunch together and talked about what I had been doing. I told him all about my calendar program and the storage files; it was one of the first times that somebody outside of my father had really understood what I was talking about relating to computers. During the course of the conversation, I mentioned my problem with the deletion. Here's the watershed moment: I remember him explaining to me that you really only need to delete the index, then periodically do a reindexing that cleans up orphaned entries. WOW! I hadn't thought about that, and I was floored; I had never really thought about the fact that somebody else may have done something similar to what I was doing, more importantly, though, somebody else actually had THOUGHT about the things I was working on. Bear in mind that this was pre-internet, and, while I was an active participant in BBS's, I didn't really have too many friends at the time who were programmers; programmer friends came soon after I learned C++. Iterators? Holy Crap! This isn't as much a watershed moment of the type above, but it is one of my favorite stories. When I was living in Hungary, I didn't have access to the internet (this was early to mid-90's, so it wasn't as widespread over there), so I didn't really have a lot of places to learn things from. Probably in about 1995 or 1996, my friend, Colin, came to visit me. Colin had been a programmer at Microsoft (he got some code in the Win95 base, although the story about that is for another time). In any case, I had been feeling a resurgence in my programming, fooling around with C++ again, as well as learning VBA (I learned VBA through the help files that came with the Hungarian version of Excel). I had a couple books, and one of them talked about data structures. I didn't have a huge background in these sorts of things. In any case, one of the data structures was a linked list. I remember reading it, thinking about, trying to digest it, but I just couldn't figure out how a linked list was useful. My main question was, "how do you actually get to the items in it?" I could visualize the linked list, but I didn't really see the means of getting to the entries. I remember sitting there with my friend, Colin, bugging him to talk about programming with me, and I mentioned this problem. Colin was always such an awesome guy, so, rather than saying, "you dumbass, it is trivial," he actually smiled, got a piece of paper and drew me the concept of an iterator. WOW! That was a tremendous moment for me. I love this story for myself, especially as I try to help people learn how to build software. In order for someone to know something, there really must be that moment when they grok it for the first time. One of my goals as a teacher/mentor is to help people achieve those "WOW!" moments when they understand something for the first time, especially when they immediately look back and go, "that is so incredibly simple." I know everyone likes to reminisce about the early days of their programming. What sort of stories do you have like this?
 Wednesday, September 19, 2007
I've always hated it whenever I see clips of the view; it always seemed like a bunch of obnoxious birds chattering away at each other about nothing. This clip, though, takes the cake. It is 7 and a half of the most mind-numbing conversation EVER!!!! Wait until you get to the part about not knowing if the earth is flat.
 Tuesday, September 11, 2007
© Copyright 2008 Corey Haines
Theme design by Bryan Bell
newtelligence dasBlog 2.0.7226.0  | Page rendered at Tuesday, December 02, 2008 7:25:30 AM (Eastern Standard Time, UTC-05:00)
Pick a theme:
|
On this page....
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 30 | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 14 | 15 | 16 | 17 | 18 | 19 | 20 | | 21 | 22 | 23 | 24 | 25 | 26 | 27 | | 28 | 29 | 30 | 31 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Search
Navigation
Categories
Blogroll
Sign In
|