I had a lot of things to do last Thursday, Feb-17. I met a friend from abroad 3am at Ben Gurion Airport and spent several hours talking before we went sleep, signed a contract for developing killer web app at 1:30am, and finally gave a presentation at The Junction at 4:30pm.

Read the rest of this entry

IGTCloud Ruby On Rails Day

January 10th, 2011

We presented on IGTCloud Ruby On Rails Day today.

http://www.meetup.com/IGTCloud/calendar/15572435/

Agenda was a bit different this time, not only technical presentations but also a few words about modern approach of building web applications.

Find the slides below.

Read the rest of this entry

I was working on tests for blender when I came upon a need to mock or stub a back-tick operator e.g. `shell command`.

Apparently this is just a shortcut for calling Kernel method :`.

So the mocking should probably be easier with Rspec mocks or mocha. something like that (didn’t test see below):

@obj.should_receive(:`, "shell command").and_return("....")

But the problem was that I’m using RR. And RR uses a much more succinct and easy to use syntax but in this particular case it was a problem. Consider this:

# This doesn't work. it stubs the :send, not the :`
stub(@obj).send(:`, "shell command") { "...." }

RR has an instance_eval syntax, but with it I don’t know how to pass a block to the back-ticks call:

stub(@obj) do
  `shell command` { "...." } # invalid syntax here ;). 
end

So after some digging inside RR’s sources I got the following working:

stub(@obj).
  __double_definition_create__.
    call(:`, "shell command") { "...." }

Open 2010 Conference

June 16th, 2010

The OPEN 2010 conference was very well organized and had many interesting talks.

The side of low level, infrastructure things was presented by people from Red Hat, VMWare and IBM. The buzz words “SaaS”, “PaaS” and the likes were all over the place together with recent hot topic of virtualization.

On the application level there were interesting presentations about Django, PostgreSQL. And of course our own presentations on Ruby, Rails, NoSQL along with a longer, 2 hours “Introduction to Ruby” workshop.

The food was great too. That’s important.

We uploaded our slides with english transcription for some of them on the “we speak” page.

Read the rest of this entry

We are giving 4 out of 20 sessions at Open 2010, an Israeli open source conference.

Michael is giving the last keynote and me and Boris will be opening 2 of the 3 tracks: open startup and open enterprise.

I’m going to talk about “NoSQL, when, why, and how” and Boris is giving an introduction to Rails, web development that doesn’t hurt.

After the tracks we will also have a long 2 hour Ruby and Rails workshop.

See you there ;)

P.S. btw, Astrails is sponsoring this event together with a couple of smaller companies like IBM, Red Hat and VMWare :)

P.P.S. Big thanks goes to Raphael Fogel and People&Computers for organizing the whole thing.

I just recently reinstalled my MacBook Pro, this time with Snow Leopard. So I’m again going through various installation problems I already forgot about from few years back when I installed Leopard.

Anyway, just had to hunt down a problem with mysql gem installation on Snow Leopard.

Apparently if you just do ‘gem install mysql’ it seems to install fine, but doesn’t work.

You get “uninitialized constant MysqlCompat::MysqlRes” error when trying to run rails.

The solution is to pass it some arguments for installation:

ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Oh, and of course install 64bit mysql version before that. I usually just download the binaries from mysql.com.

http://markupslicer.com

Supports ERB and HAML for now, vote on site for more formats.

Beautifully crafted, totally free and it’s kinda fun.

We originally came with the idea to skip this dull and dirty manual parsing and thought that others might find it useful as well.

Play with demo project and tell us how was it.

Read the rest of this entry

About a week ago about 15 people were gathered in People and Computers offices thanks to Raphael Fogel.

Jerry Cheung, nice guy from Outspokes, told everyone how Outspokes was built from the inside and shared his view on building javascript intensive application with Rails as a backend.

Outspokes uses fancy javascript to allow in-browser collaboration of development/design/client teams to request changes, track progress and report problems on ongoing project. I definitely will try it out.

Boris Nadion from Astrails (that’s us in case you were wondering) told the story of our own MarkupSlicer - free to use project we wrote to simplify creating ERB/HAML layouts and partials out of HTML markup we get from our slicing team.

Vitaly Kushner, also from Astrails, made a nice intro presenation about Cassandra - our choice of NoSQL breed. We working with yet to be disclosed client on very technologically challenging project and cassandra is one of many interesting solutions we working with (You can expect a case study on this project in couple of months, as soon as it will go public).

Cassandra Intro presentation

Read the rest of this entry

There is no magic, indeed.

January 14th, 2010

I’ve just read ”Do You Believe In Magic?” and the following quote resonated particularly well:

“It’s not magic. There is no magic involved. It’s just, if you never learnt Lisp, then you never learned to program, and Ruby’s power is exposing a deficiency in your skills.”

I find it to be very true, and I suppose one of the reasons I’m so happy about Ruby is that I learned Lisp and Scheme before.

Even though I didn’t use Lisp for any sizable project. I tried, but I found it to be quite unfriendly and ‘hairy’ in setup, environment and library support. Ruby solved all that for me w/o sacrificing almost anything power vise.

Yeah, I know, MVC is the “Only True Way™”. But sometimes, just sometimes, you need your link_to or html helpers working in the model.

For example, sometimes the cleanest way to implement something is to have to_html in the model (widgets anyone?). Doing this will most probably require generating some urls, and you need a controller for that. Usually I solved this by passing controller to the to_html function, but it always felt wrong.

Read the rest of this entry

Clicktale is a service that allows you to record and later playback behavior of your users while they are using your site. And Rails is Rails, you know. And those two are getting along just fine, until the user logs in. After that clicktale service is cut out of the html pages this user gets and can’t record the session. But it just started to get interesting…

This plugin brings back the connection between Clicktale and Rails even for those closed pages. You’re going to get your better usability after all.

Read the rest of this entry

Thanks a lot to Amit Hurvitz for providing a file of Virtual Disk Image (VDI) of VirtualBox, containing an up and running JRuby on Rails on Glassfish with Mysql. Image also contains some examples (actually solutions to the code camp exercises), all running on top of an OpenSolaris guest OS (can be run on many host systems).

Grab the image ~1.5GB archive.

Grab the exercises ~9.7MB archive.

We participated in JRuby on Rails with GlassFish Code Camp hosted by Sun Microsystems Inc. I was speaking about the framework in general trying to infect Java developers with Ruby On Rails. Slides are available.

Amit Hurvitz gave exciting presentation about GlassFish and short introduction into DTrace. Find out more details about the Code Camp.

Rediscovering HAML

February 11th, 2009

I was the last person in our company working with ERB to render templates. While all the rest switched to HAML. At the beginning it was quite hard for me to read HAML comparing to ERB. HAML looked for me like some completely alien thing with weird percent marks all over the place and the significant whitespace never did it for me. On the other hand ERB felt like warm home after years we spent together.

Until I did the switch.

Read the rest of this entry

Recently we looked for video transcoding/hosting solution to use in one of our client’s projects.

The best thing we’ve found is Panda. It runs on Amazon stack of services including ec2, s3, and simpledb.

Using amazon has many advantages. no contracts, pay as you go, easy and fast scaling in case your site explodes :)

Unfortunately the image that is refered in the Getting Started (ami-05d7336c) is not safe for production – it has openssh version with a serious security bug, but don’t worry, we will explain how to fix it.

Read the rest of this entry