Ruby-watch in Oh-Eight

As is tradition at the end of the year, I made my own New Year's Resolutions - some were the usual (get fit, spend less time on the computer etc. etc.) but I set two goals specifically related to this one blog post - Firstly, as you've probably guessed, I promised myself that I'd blog on a more regular basis on my own plan and secondly I promised to both learn more programming stuff and to more actively participate in the community. In the vein of the last two, I know present with you a short list of some technologies I think you should keep an eye on in 2008.

(Please view full post for more.)

Posted by in Programming and it's been tagged as ruby, programming, 2008, rack, merb, mongrel & thin. There are currently zero comments.


VisitTracker

Being bored today, I decided to take a bit more in depth look at Rack as well as trying to write a nice little demo app with it. The result you see here is today is VisitTracker - a mini hit logger for websites that produces CSV log files with minimal amounts of info.

(Please view full post for more.)

Posted by in Programming and it's been tagged as programming, hits, statistics, web & rack. There are currently zero comments.


The road to ATM

For the last year or so, I've been planning on launching a new project - something different to what I've worked on (e.g. this blog) with commercial viability. In other words, I've dreamt of working on a startup-style company (A dream I actually achieved in late 2007 when I joined the WhyGoSolo team) with the aim of launching something I think would be pretty damn cool.

(Please view full post for more.)

Posted by in Programming and it's been tagged as programming, atm, series, ninjas & ruby on rails. There are currently zero comments.


Commenting == Fixed

I only realised earlier tonight that I'd made a big boo-boo with the blog - commenting required you to be logged in, something which was restricted to Admin users. So, I've since fixed that (as well as a few bugs you likely wouldn't have seen before) and all seems to be working well know.

Posted by in Programming and it's been tagged as blog, programming & fixes. There are currently 1 comments.


Learning Languages

As a programmer, one of the things I enjoy the most is the structure of languages - how inherently different styling can mould the experience I have when learning it. As an offshoot of this, I've slowly become interested in different programming languages and how they can be used in everyday life.

(Please view full post for more.)

Posted by in Programming and it's been tagged as programming, languages, erlang & haskell. There are currently zero comments.


Eoraptor's future

Since its first inception a few months ago as a merb blogging platform (I'm now running on Rails 2.0), I've always had the aim of releasing Eoraptor (the software that powers this blog) under an open source license. The platform still has its kinks (as you are no doubt aware) but I'm planning on releasing it as open source once I've finished a couple of items off. Primarily,

  1. Spec's for the entire site - I've been pretty lazy so far in this regard
  2. Twitter / Tumblr / Pownce like integration - I'd ideally like a flow-of-thoughts style front page
  3. Finish off the projects section - it's currently part done but disabled on this blog.
  4. A settings page - to make it easier to administrate

I guess once all of them have been covered, I'll finally release it. For the moment, consider this more as a road map.

Posted by in Programming and it's been tagged as eoraptor, blog, rails & programming. There are currently zero comments.


Erlang & Project Euler

Just a quick and fairly simple post. I've been reading Programming Erlang over the last few days and decided tonight to have a quick play with the Project Euler problems (having never done them before). Here ~10 minutes work :)

%% Erlang Solution to Project Euler Problem #2 %% "Sum of all even primes under one million" %% Written by Darcy Laycock %% http://blog.ninjahideout.com/ -module(pe). -compile(export_all). start() -> process(1000000). process(Max) -> io:format("Calculating All Even Fib. Under ~p~n", [Max]), evenFactorialsUnder(1, 1, Max, 0). printResults(0) -> io:format("No Known Results.~n"); printResults(Results) -> io:format("Found Result:~n~p~n", [Results]). evenFactorialsUnder(A, B, Max, Acc) when A+B > Max -> printResults(Acc); evenFactorialsUnder(A, B, Max, Acc) -> NewNum = A + B, case NewNum rem 2 of 0 -> %% even evenFactorialsUnder(NewNum, A, Max, Acc + NewNum); 1 -> %% odd evenFactorialsUnder(NewNum, A, Max, Acc) end.

Edit: More of these coming tonight :) Simple but fun!

Posted by in Programming and it's been tagged as erlang, programming, problem & maths. There are currently zero comments.


Eoraptor Extracts - "Prepares.rb"

Just a simple one to start off today - This is a piece of code I've reused quite a few times and it's really saved me a lot of coding time retyping the same thing. In essence, prepares is a single drop in file for rails that adds a few niceties - basically preparing a model instance (via find) and storing it in an instance variable.

(Please view full post for more.)

Posted by in Programming and it's been tagged as ruby on rails, eoraptor, code & provides. There are currently 2 comments.


Now extra thin!

And in other news, I upgraded the blog to Thin tonight. The extra speed and power was a nice incentive to switch as was the whole 'coolness factor'. Next up is rewriting the stats server. So +1 Kudos for thin!.

Posted by in Programming and it's been tagged as blog, rails, server & programming. There are currently 1 comments.


On ATM - User models / code

One of the core areas (well, the main core area - it's the main apart of the application that is shared between all of the applications that make up ATM) is the user management system. Built from the ground up (e.g. not using Restful Authentication itself) it combines lessons learnt from my experience using other systems.

(Please view full post for more.)

Posted by in Programming and it's been tagged with zero tags. There are currently zero comments.


On ATM - SubApp Syncing

Untitled

To better manage the ATM code base, one of the first decisions I made was to have several different sub apps. Each sub app will basically inherit all models etc from the site core as well as libraries etc. One of the key pieces of software in the current ATM code base is ATM Tools - a small library designed make it easier to sync different apps from the core.

(Please view full post for more.)

Posted by in Programming and it's been tagged with zero tags. There are currently zero comments.


Busting a cap in yo' ass!

Ok, the titles lame but I hope the contents aren't. Today I'll be running through a quick Capistrano config - perfect for if your running on a VPS - that has a heap of free goodies included. Also, thanks to Skiz on #offrails for a nice start earlier after I lost some of my stuff.

(Please view full post for more.)

Posted by in Programming and it's been tagged as programming, rails, deployment, ruby & capistrano. There are currently 2 comments.


Rack::URLMap and kicking ass.

Rack come's with a lot of excellent middleware out of the box, making a lot of seriously cool things possible. One of the most important of these middleware's is URLMap - a little gem that lets you map different url paths to different rack applications. Using Rack::Builder / rackup syntax you can use the map method with a block to define a different urled application.

(Please view full post for more.)

Posted by in Programming and it's been tagged as rack, ruby, programming & urlmap. There are currently zero comments.


5 Misc. Rails Tips

Just a quick note before I start - This has been written mainly as an entry to the Railscast's contest for epic loot. With that said, I'm hoping they're some generally helpful tips.

Tip #1 - Join the community

The most important part of Rails is the community - the fantastic little groups thats pop up focused on individual niches. You've probably seen WorkingWithRails and the like but my suggestion is that as a Rails / Ruby-based developer, it's usually in your best interested to partake in the community. And even more so, not just the communities for your specific niche - read up about alternatives (e.g. Merb), hang out in irc rooms and most of all participate. For Rubyists, I recommend the following:

  • User Groups: Join your local user groups; In Perth we have AWIA / Port80 (which is Web Developers in General) and RORO - both of which are an invaluable source of knowledge and a great bunch of people. Also, most will put on talks or events of some kind (RORO over east has Railscamps which are damned awesome looking) and so you'll also get plenty of opportunities to network and to learn more.
  • Forums / Mailing Lists: I'm not into forums as much as I used to but both Forms (e.g. RailsForum) and Mailing Lists (e.g. the official Ruby On Rails one etc) are a fantastic place to both read news and to keep up to date. An even better way of building your knowledge is to be on the bleeding edge and Mailing Lists in particular (along with IRC) are the perfect places to find out what people are making.
  • IRC: I can't stress this enough - Hanging out on IRC is a great way to meet people in your community, to find out what is happening and to just learn. Freenode seems to be the hip place these days and I suggest checking out #rubyonrails, #merb, #datamapper, #roro (if you're Australian) and #offrails - The last one is less formal than the others but is in general a small community of usually-rails-based developers.
  • Twitter: Lastly, Twitter is the new irc. My only suggestion here is to sign up if you haven't a follow a few different Ruby / Rails developers. There is a lot of noise but there is also a lot of new stuff.

Tip #2 - Have a testing server

When I say testing server, I don't mean one dedicated to running unit tests; I mean one for you to test out little ideas - even if there is a possibility they could bork your environment. VM's are ideal for this and VirtualBox is both free, easy and available on most major platforms. It can be as simple as downloading VirtualBox, an Ubuntu ISO and then setting it up like a real environment - all safely nestled away on your development box if you'd like.

If you want to go a bit further and you have a spare box sitting around, setup Vmware Server or Xen and a few different vm's with different environments - In particular, a Continuous Integration box may come in handy and I've always like the idea of having my own gem server which builds gems for the edge versions of Merb, Rails and the Like so my system is always up to date. It shouldn't take more than a day or two to setup and if you don't have much server experience, it's the perfect excuse to learn.

Tip #3 - Check out new technology

Try and stay on the cutting edge of things - e.g. become one of the early adopters of a technology (e.g. Merb / Git are examples of that a while ago - they're pretty much mainstream now). The technology / project you choose may not become mainstream but you'll learn a hell of a lot you likely wouldn't of before - I learnt a lot about ruby by reading through the source of early versions of Merb.

Also, contributing back to new technologies is usually a good way of getting to know people (see above) and it's also another way of getting respect among other developers.

Tip #4 - Have a pet application

Even if you're only doing Rails for work, I suggest having a little pet application at home to experiment with stuff. It may not be used by others but it's an excellent way of trying out new things, building your skills and honestly, who knows - you could have the next github on your hands.

More seriously, by building a pet application you get to not only focus on something at your own pace but it also lets you put into practice things that may only be applicable in certain circumstances in the real world as well as having the freedom to test out plugins etc as you see fit.

Tip #4 / #5 - Do RailsRumble

This one is more specific than the others but it's for a reason - I highly suggest taking part in the next RailsRumble when the times comes around. It's not only a bloody good time but if you get a team together it's an excellent environment in which to show off your development skills.

The main reason I'm suggesting this is because it ties together everything I've already suggested - It lets you work in a real world situation (e.g. time based), it lets your form invaluable connections (I only now frequent #offrails because of RailsRumble) and there's even some nice motivation for taking part.


Well, there you have it - My main 5 tips for Rails developers; All of them intended more at being a better developer than developing better (if that makes sense)

Posted by in Programming and it's been tagged as rails, ror, programming & railscasts. There are currently zero comments.


Enki, Menki or Eoraptor?

A while back whilst browsing the RORO Google Group, I noticed Xavier Shay's little project "Enki" - an interesting little blog engine written on Ruby on Rails.

(Please view full post for more.)

Posted by in Programming and it's been tagged as ruby, rails, ror & merb. There are currently 1 comments.


A little taste...

Of what's to come...

First up, there's Ponder - essentially a rebuilt version of my RailsRumble project for my Uni web-tech (CITS1231) project. The page you see below is a part of the standard user profile (in this case, the currently logged in users profile).

Ponder_—_darcy_l_s_profile

Next up, is a Java (CITS1200) project I'm working on in a group; One of the parts is to write a class to Graph Polynomials and well, this is it. Note: If you have suggestions on improving the smoothness of the graph itself (e.g. some sort of interpolation or something along those lines - It comes in because we're converting double's for the x / y value to pixel coordinates so it's not exact), Feel free to post them.

20080514-jt16gm44ubjri641br2wuinfig
Posted by in Programming and it's been tagged with zero tags. There are currently zero comments.


Now featuring projects

Just a quick eoraptor / this blog pimping tonight. One of the features I've been planning to implement for a long time - projects - has now been implemented. It's basically a really easy way to have a structured project page with integrated logos etc. Nothing big but nice to have none the less. Plus, it puts me one step closer to open sourcing the site.

Posted by in Programming and it's been tagged as eoraptor, blog, ror & projects. There are currently zero comments.


Mapstraction and Geokit

Welcome to the first in what is hopefully the first in a series of posts introducing some of the stuff we use behind the scenes for Ticket’s with a Twist. Today we’re going to talk about two open source libraries: One for Ruby and one for Javascript (including my own little wrapper around it).

(Please view full post for more.)

Posted by in Programming and it's been tagged with zero tags. There are currently 1 comments.


Another "What I've been working on" post

Short and sweet today - just a quick glance at Tickets with a Twist; A new site I've been building (n.b. I didn't design it) for Yut Media. Enjoy!

Posted by in Programming and it's been tagged as yut-media, rubyonrails, ror & development. There are currently zero comments.