coding, javascript, ruby

Date Time mess with JavaScript is a breeze in Ruby world

Those of you whoa are seasoned in web develop know what i mean when i say date/time parsing , formatting can be ugly and time consuming. You turn to DateJS or momentJS (my currently favourite), you always (you should) look at the last time the project was updated, you make sure its not dependent on jquery or something else.  You also would hope that it works nicely within your nodeJS app.


Then there comes the time where you need a nice date time picker, there are many but some forget about time picking. I’ve used a few , moved to different, etc. Sometimes these date pickers have their own date time format , GREAT! now you should be careful when parsing on front end is okay and parsing on backend works too.

Here is why its a pleasure of having DateTime class baked right into Ruby, for parsing and formatting.

Here is a handy url

Share This:


Ipad Air – the new generation

Much lighter, much faster , 64 bits with motion sensor (i won’t run with it, but something might be built that will use it)

Let the games and iWork begin.

AutoDesk is definitely going to be faster for those in engineering reviewing designs.



Share This:


OSX launchctl , you’re a friend – Launch Daemons

Whatever they are (chrome makes use of them, developing and using .dev domains, running some processes or running your own custom app) , its easy to control, manage  and rid of them.


launchctl  – is the handy tool


Adding a custom service , here is a handy explanation

It’s really useful if you want to be a power user.

Continue reading

Share This:

coding, ruby

Dot Freeze – fairly easy to prevent objects from modification

Freeze and Frozen?

Too bad NodeJS doesn’t have this feature but Ruby does!

The freeze method in class Object prevents you from changing an object, effectively turning an object into a constant. After we freeze an object, an attempt to modify it results in TypeError.

str = ‘A simple string. ‘

str.freeze  begin

str << ‘An attempt to modify.’

rescue => err

puts “#{err.class} #{err}”


# The output is – TypeError can’t modify frozen string

Share This: