Recently in Programming Category
April 8, 2009
Geeking Out on Ruby On Rails and Heroku
Lately I've gotten re-interested in the Ruby On Rails framework. It's not only because of it's sort of... "new hotness" that's out there on the net, but it's got a lot of neat technologies that are being used. Also this is all close enough to the work on webapps that I'm used to doing, but also different enough from old and boring Perl and HTML::Mason to make it interesting and not (completely) frustrating. Also I want to annoy the (PHP|Java|Scala|C#) lovers who may or may not be reading this :)
I started going to the Fraser Valley Ruby Brigade meetups, and it was very cool to find other like minded folks in the area (the other big group around is in Vancouver, and when you're out in the boonies, that's a long way away!). Lots of newbies and not enough people to answer questions, but it's a growing group that's just starting out. The main dude, Miles is really enthusiastic about this stuff too, which is awesome. Oh, and I'm also insanely jelous of his brand new (used) 30" Apple cinema display. Yowza that's a big screen!
I also found out about a (currently) free Ruby on Rails hosting system called Heroku, and with a bit of help from the quickstart guide and the workflow guide (note, you have to run the "git remote add..." command before you can run the "git push..." command).
It's a very cool system that gives you a subdomain, hosting, and a fairly sexy system to allow you to do local development and then push changes up to the "production" server. All for free. Course, if you're not familiar with git at all then you get to learn that, which has been... "interesting" so far for someone like myself who only is really familiar with the basics of subversion.
Along with Heroku is something called Heroku Garden, which I'm not sure exactly how it factors into things. Looks like an online editor though, which is cool if you don't have local development tools.
Currently it's all free, with future pricing/packages to be determined. I'm sure that it's just a clever ploy to get people hooked and then suck them to stay with a monthly fee :) Course, for now it's about as cheap as you can get, and it's a fun setup to play with!
So for now I have a site setup with absolutely nothing going on. Hopefully I'll have some stuff up there as I get more into things.
March 11, 2009
Random Links of the Day
Went to the Fraser Valley Ruby on Rails meetup tonight. Organized by a guy who now works under one of my ex-bosses from back in the dot com days, basically a group of geeks interested in the Ruby on Rails framework who get together and geek out. I've only been to two meetings so far, and so far it is more geeking out than actual Ruby or Rails work, but the group and the direction is still evolving.
While there wasn't a lot of "project" work per-se, I did find a set of interesting links to look through.
- Stack Overflow - Site for finding solutions to programming problems without a lot of cruft.
- Refactor My Code - Submit your programming problem/solution, and other folks can check it out and help to make it better/faster/smaller/less calories.
- 15 Exercises for Learning a new Programming Language - A nice selection of short and simple problems to help learn a new programming language with.
- Project Euler - An interesting idea. A list of programming / math problems is given, if you submit a solution, you get to see how other people solved the same issue.
Looking forward to next weeks meetup, it's nice to be able to just geek out for stuff that's not work related. Also good to network with other local geeks out in the boonies :)
January 26, 2008
Ruby Camp 2008 Review
Today I went to my first Vancouver Ruby Camp, a set of talks by people in the local Ruby and Ruby on Rails community. Translation for non-techies out there... a complete geek-fest! It was great :)
Honestly my RoR experience is near nil, and my Ruby experience consists of reading a book on the train and poking away with it on my laptop, so a lot of the talking went completely over my head either in concept or technology. Course, I knew that going in, and was expecting to do nothing more than go there and asbsorb as much knowledge as I could.
I saw on their FaceBook page that there was a guy looking for a carpool out from Mission, so I volunteered. Nice guy by the name of Nathan, turned out to not be an axe-murderer, which was nice. We had some serious geek talk going in and out too, which was enjoyable... this is the kind of talk that would have made my wife jump out of the car too.... everything from the given Ruby and RoR discussions to Lua and OCAML.
Like I said, the talks were good... not only info to absorb, but also info to research and read up on. Such as:
- Project testing and collaboration
- Mingle - Project collaboration
- Continuous Integration
- Cruise Control RB - A continuous integration tool
- Selenium - Testing tool for web applications
- Mingle - Project collaboration
- Other Ruby / RoR Implementations
- jRuby - Java implementation of Ruby
- TrimPath - Ruby on Rails implemented entirely in Javascript, allowing the application to run entirely within the client side browser, and when combined with something like Google Gears would allow users to do data changes while offline, and then the data will be synced back to the server when you go back online. There was a good demo of this, however, it didn't seem to go quite as well as it could have, so I'd say that the online/offline data storage and access might need a bit of work to make it more robust.
- Merb - Like Ruby on Rails but light and fast
- Merb tutorial
- Rubinius - A re-implementation of Ruby in Ruby, to allow easier access to changes and bug fixes from the community. I'm the least sure about this one to be honest... it seems that the trouble of keeping this version of Ruby synced up with the "master" (which I assume is Matz's version)... however, I didn't know enough about it at the talk to do anything other than feel the conversation passing over my head at 10,000 feet.
- jRuby - Java implementation of Ruby
- Interesting People / Blogs/Blog Entries
- Loud Thinking (David Heinemeier Hansson)
- How Ruby on Rails could be much better - Talks on shared hosting from Dallas who works at Dreamhost
- Jamis Buck - Author of Capistrano
- Why Rubinius and Merb matter
- Loud Thinking (David Heinemeier Hansson)
- Other Ruby Tools / Links (I'm sure they are all known to people in the Ruby world already of course)
- Capistrano - Ruby on Rails deployment
- MemCacheD - Caching system
- Capistrano - Ruby on Rails deployment
- Other
- Javascript SetTimeout() and SetInterval()
- Book: Ship it! - Apparently a great book to make you think about how you design apps and systems from an architecture point of view
- Javascript SetTimeout() and SetInterval()
April 3, 2007
Source code for Consumating
Darn you Darren, first not coming out this week and then pointing me to clonesumating as a possible drop in replacement for the aging P2P.
Note to self so I don't forget about this link....
March 5, 2007
Perl Programming Assist Please
I'm going crazy here, my brain apparently fried from the weekend or the water or something, looking for some perl assistance from my perl-knowledgeable buds (you know who you are... :)
I'm creating a menu system and converting entries in a database into a perl data structure that I can then parse to create an HTML menu. I'm having a real problem with the first part. I want to take a list of strings such as:
/about/contact
/about/contact/map
/about/contact/email
/about
/products
/products/style1
/products/style2
/products/widgets
/products/widgets/foo
/products/widgets/bar
/products/widgets/baz
/products/widgets/baz/qux
(The strings can have infinite depth (not restricted to 3 or 5 sub-levels) and is dynamically pulled from a database.)
I want to take this and convert it into a datastructure such as this one here (which is part of HTML::Widgets::NavMenu).
The gory details are a bit.... gorier. The strings are just an element of an object created out of the database, and the 'path' is actually a list of numbers (/1/2/3) but this seemed easier to work with.
This stuff used to be simple.... argh, embarrassed :(
February 28, 2007
The FizzBuzz Test
Interesting way of determining how good a programmer is on Imran's blog, called the FizzBuzz. I took it to make sure I wasn't a crappy comp-sci grad who couldn't program and discovered happily I could. Took just under four minutes to complete, though part of the extra time was I forgot how the '%' operator in Perl worked (returns 0 not 1).
(A) Solution after the read more....
August 16, 2006
Handy Forms Tip for Web Developers in Mozilla
I'm probably the last person in the world to discover this, but I finally figured out something useful for the Mozilla/Firefox "view page info" property box available from the context menu. I've seen this before of course, even clicked it a few times, mostly accidently. Basically it displays, information about the page. Media type, links, etc. Not really useful to the casual surfer for sure. Then I was doing some development on a project and found something wonderful about it.
As any webdev knows when you're turning the form fields you get from your web designer into code it's a pain in the ass. More often than not each field is named "textfield1", "textfield2", etc, and you have to go into each one, change the name of it, remember it, add that to your form processing, etc. Kinda a pain sometimes to say the least. Well the view page info button has a "forms" tab which lists not only all the form fields, but their names, input type, and current value!
As you can see this is my new favorite tool for looking at and debugging form fields on a page!
July 18, 2006
The Push is Ov.... Oh Never Mind
Well it looks like my latest consulting project is wrapped up. Still one more tiny bit of functionality waiting to go, but I'm waiting on them for the info on how to do it. Really just a matter of "where do the files get uploaded". It's a great relief too, I was starting to think that that project would never end. After about 4 weeks of working on the same project I was getting really close to the "don't care" realm. However, the bug reports and feature requests have stopped, and the last question I got on it was a frantic "I can't get to the server!" message, however that was a simple solution of "works for me" and I pointed an accusing picture at the cable modem provider :)
Next in line is finishing off some details on the other project that I took at the same time. This one is a bit easier / nicer to work on, and somehow they are taking features off of the system instead of putting them on. What the heck? :)
July 9, 2006
Contract Programmers - How Do You Bill?
For the last few years I've done contract programming work. Sometimes on the side, and sometimes as my full time job. Lately I've had some projects that I feel I've gotten... lets just say the short end of the stick. This seems to happen when I'm the subcontractor and put in an hourly quote, and the people I'm working for are doing work on a project basis.
Part of the issue is that I have a tendancy to completely under-estimate the hours to do a project. Either that or the hours are correct and the clients add features and things in that they figure should be in there, but I never thought about when I went through the requirements in my head.
It also happens because I don't have the balls to say "no, you can't have that included".
I'm looking for the best way to make sure that both myself and my clients win, so I'm wondering how other people who do contact work (programming in particular) go about it.
- How do you estimate?
- Do you put in a quote and then bill that quote exactly?
- What about ballooning of features (ie: not things that are outside the scope, but things that are just outside what you envisioned)?
- What do you send to clients? Is it a full func spec and task list, or a brief description of the final result? If it's a full func spec, how do you ensure that the clients follow it and realize that when they say "but I thought a preview feature would be in there?" that it wasn't in the spec?
- How complex a proposal do you put in? I've been caught more than once quoting a project very loosly because I get very strong>un-detailed specs to quote off of. Part of the market advantage I have (I think) is that I can move fast. Spending a week hashing out a detailed spec loses clients when you can put in a quote in a day and get started the next. Of course, thinking about it, putting in four times the time that you get paid for on a project isn't a lot better...
- How hard-assed are you as far as specs? If it's not in the spec and they want it added what happens? What if it's a small but time consuming thing? What about big features? How much time is taken doing this?
- Any pointers to spec sheets, contracts, etc that are out there to see and use as examples?
- How hard-assed are you as far as specs? If it's not in the spec and they want it added what happens? What if it's a small but time consuming thing? What about big features? How much time is taken doing this?
Any other tips to share on how not to get the short end?
April 25, 2006
Dear Javascript Gurus out There...
function StartUpload()
{
// first check if it's a 'delete_xxx' button being hit, and return
for (var i=0;i<document.F1.length;i++)
{
current = document.F1.elements[i];
if(current.type=='submit' && current.name.match(/delete_/))
{
return;
}
}
// ... rest of function here...
It works, and it's really slow, because I presume it goes through every single (HTML? or just form?) element on the page. What I really need is to find out what the current button that was pressed is. I know the name will be "delete_XX" where XX is a number from 01 to 05.
Can anyone help me out?
Update: I fixed this by digging a bit deeper into the code. In there there is a counter for the number of file browse dialogs that are not set to an empty string, so simply checking for if the counter is greater than 0 or not worked dandy. There is still an edge case where a large upload under mozilla gives the "Script is causing your computer to perform slowly" message, but I think that's somewhere in my code.