Back in college, I volunteered to help on "Women in Computing Day" to teach middle schoolers programming using Alice. I also helped teach an undergraduate teaching assistant position for Engineering Fundamentals, the class all engineering students were required to take. The course used Alice to introduce the students to programming concepts (loops, methods, conditional logic, etc).
I thought Alice was a really innovative way of teaching programming. It was GUI-driven programming that was expressive enough to do cool engineering stimulations, but with the simplicity that middle schoolers could understand and use it.
The other day, my mom asked me to find the "Last Lecture" by Randy Pausch, some professor that made this speech. She had heard about on the T.V. and was interested in seeing what it was all about. I found the YouTube video and began watching it. To my surprise, Dr. Pausch's work has crossed my path. He is the creator of Alice.
His speech is very inspiring. Watch it.
The Open Geospatial Consortium just announced that KML has been adopted as an open standard. KML stands for Keyhole Markup Language, originally designed by Keyhole who was acquired by Google back in 2004. Keyhole's Earth Viewer product was reborn as what we know today as Google Earth. I first came across KML when I was working on some data visualization using Google Earth. I found it to be very expressive and easy to use. You can do neat things like stream dynamic KML to animate the map or add overlays on the map.
It's interesting to see how Google Earth/Maps's popularity has allowed KML to become the international standard. It will be even more interesting to see how quickly the standard is adopted by many of the geo-visualization products out there. While I don't think it will be "the HTML of geographic content", I do think this standardization will open up the market for new products that build/support KML, pushing KML to its limits as we have done with HTML.
Google App Engine, which acts a Google-hosted application platform powered by Google technologies like BigTable and GFS. You can read more about it here. I was lucky enough to get an invite to try it out. Right now it only supports Python, but they say they plan on expanding this to other programming languages. I hope that's true. I never really played with Python but this might give me more incentive to take a closer look at it.
Anyways, going through their Getting Started documentation took about 10 minutes. All of the apps are hosted at the appspot.com domain but from the Admin console, it looks like you can have your use your Google Apps domain which is pretty cool.
Check out what I got so far at: http://notes.appspot.com
I've been dealing with Daylight Savings Time issues at work. It's a pain. I found out Hawaii and Puerto Rico don't observe DST the hard way. It came to a surprise to me that Wordpress that does not support Daylight Savings Time handling at all. I posted my last post and realized the time stamp was off by an hour. Wordpressers have to manually update their blog settings to account for the hour(s) offsets from GMT whenever DST comes and goes. Luckily, there is a plugin that automates this process for us. Check it out here.
I was writing some code in an erb template that looked like this:
This resulted in a syntax error. Huh? What's wrong with this?
Turns out it's an outstanding Core Ruby bug.
As shown in the ticket if we have a method foo
using the ! and the not operator on various method calls show us that the ! and not operator are not interchangeable in practice.
Changing the my code to the following fixed my issue:
<% if @user && not @user.errors.empty? -%> #do stuff <% end -%>
def foo(parameter) puts parameter.to_s end
foo(!(1 < 2)) # works fine foo(not(1 < 2)) # generates syntax error foo(not 1 < 2) # generates syntax error foo((not 1 < 2)) # works fine
<% if @user && !@user.errors.empty? -%> #do stuff <% end -%>
I wanted to delete some .svn folders that didn't go away when I disconnected from a repository but couldn't see them in Finder. So I needed to show hidden files. Here's how to do it.
Open up Terminal
>> defaults write com.apple.finder AppleShowAllFiles TRUE >> killall FinderReplace TRUE with FALSE to hide them again.
Domain-specific languages are becoming more and more popular. I across websequencediagram.com which really illustrates the power of building DSLs to tackle very specific problems. I don't spend my time creating many UML sequence diagrams now a days but if I ever have to, I'll be remembering this web app.
I've had my MacBook Pro for a couple of months now and I've officially switched over to a MBP at work as well. All this time I have been working without a delete key. That thing labeled 'delete' on my keyboard is really what I have known in the past as a 'backspace' key. Naturally, I assumed ⌘+delete would give me back my true delete functionality, but that didn't do it. It turns the magic key combination is Fn+delete. My productivity should go up now! Yay!
I came across this Google TechTalk with Linus Torvalds on git. I've never seen or heard Torvalds speak before. He certainly has a good sense of humor...or arrogance :).
It's been almost a year since this tech talk and I still really haven't seen large adoption of git. However after some painful experiences with Subversion, maybe it's time to take a closer look at git. git sounds great in theory and design, but in practice I'm not yet convinced there is much value add.For example, the point that a truly distributed system allows you to make commits when you are unwired since the commits only go to your local repository, in my opinion, isn't much value add. I am never really away from a wireless point or ethernet cord when I intend to code. The internet is just too much of a valuable resource for me to be disconnected when I'm coding, whether it be googling an obscure exception or reading online documentation.
The design of git is kind of reminiscent of what maven2 did for the build process and dependency management, with the idea of local repositories and selecting with distribution repositories you trust to pull down your dependencies.
I like the idea of the network of trust. I think that's where the big win for git is. If I know a coworker is working on a piece of code and won't be done until the end of the week, I know not to "trust" their branch until they tell me it's ready.
git seems to encourage more communication between developers, which is great if the teams are practicing Agile software development. The idea of "Individuals and interactions over processes and tools" really needs to be instilled into the developers for git to work though. With so many branches around, there needs to be more communication between developers as to what features or branches are ready to be merged into the next release branch.
I guess only time will tell if git will be accepted by the masses.
My background in C++ and Java has instilled in me some programming habits that don't play nice in Ruby. When I want to increment or decrement a number, my fingers instinctively go to '++' and '−−'.
Unfortunately, this syntax is not supported by Ruby. As a language design choice, Ruby opted to not support this syntactic sugar to increment/decrement a variable.
I will have to break my habit and start going with:
// increment x x+=1 // decrement x x-=1Another thing to note is that the prefix increment/decrement operators like '−−x' or '++x' do nothing. The signs are interpreted as unary operators.