– we create awesome web applications

When it time came to print a new batch of business cards. I tried to find the latest design we’ve used a few years back and update them.

Than, suddenly, I though: what if I had an app that allows sharing a business card. I searched App Store and found a few not trivial apps that probably only engineers can use.

I had strong vision of how the app should look like and what should it do.

  1. It should allow having as many cards as I need. Well, I hold a few positions in a few companies Astrails work with.
  2. It should not keep my personal information somewhere on remote servers, who knows how well the data is protected there.
  3. And most important: it should be super easy to the receiving party to save the card, no extra apps should be required for that.

Imagine that you’re starting a meeting with 3 participants.

Asking their phone numbers/emails and sharing your contact from a phone is not an option. It will take a lot of time and introduce an unnecessary hustle. The sharing should be as simple as passing a printed card.

So, the answer for the last question is QR code with embedded vCard, default camera app since iOS 12 and Android 9 recognizes QR codes. And you should only show your phone to participants.

That’s how Virtual Business Card was built. There is a video there, so feel free to check it out.

Right now it only works on iOS, Android version is coming soon.

This is the 4rd and a last post of the series, Part 1, Part 2, Part 3.

The initial release of AngularJS happened just one week after the release of Backbone.JS, but was pretty much ignored for a while. It took some time to understand that in addition to Javascript, HTML and CSS, frontend developers that wanted to succeed with Angular had to learn ng-extensions too. Within a few years, Angular became very popular among developers. The only problem was that it was very easy to get started with it, but pretty complicated for more advanced things.

Exactly one year later, ex-Rails core engineer Yehuda Katz released Ember. The first version was super opinionated and had a high entry barrier. Instead of trying to solve some small tactical issues, Ember directly targeted full-featured client-side web applications.

Two years after that, Facebook released the first version of React - a breath of fresh air for frontend development. No monolithic applications, no misplaced MV (whatever) patterns, no extensions. Yes to Daft Punk’s Random Access Memories, album released that same year. The concept of React was very simple: representation is a function of an application state. Just implement the render function as a function of a state, include optional lifecycle callbacks, and React will take care of the rest.

Later, Facebook introduced Flux, frontend application architecture with unidirectional data flow. Dan Abramov’s react-redux based on Redux is probably the best implementation of the same concept of unidirectional data flow. It took about a year and a half for the community to catch up and by the end of 2014, React became extremely popular.

And at the beginning of 2015, Facebook released React Native, a framework for building native apps with React that introduced the concept of “learn once write many”. iOS and Android applications will not share 100% of the code, but it is possible to reach 60-90% depending on the requirements. Compared with 0% code sharing when developing ObjectiveC/Swift for iOS and Java for Android, this is quite an achievement. Especially when taking into account that development is mostly done using React and Javascript.

Angular 2 entered the beta stage in late 2015 and was released in September 2016. Its breaking changes and a few concept shifts deprecated most of the knowledge and experience that developers had accumulated while working with Angular. Some developers were angry about these changes because they had to re-invest time to basically writing everything again from scratch using Angular 2. But some were happy because the new version was better engineered and more fun to work with.

Initially released in 2014, Vue gained popularity around the same time that Angular 2 was released. It was what Angular JS should have been from the beginning.

At the end of 2015 and most of 2016 there was a popular joke: two new Javascript frameworks were probably released while you were reading this sentence. And another three have just died.

Q&A

So, what should I use now?

React. Unless you have someone on board who is familiar with Angular, then use Angular or Vue and consider React anyway.

What should I learn if I am just entering this field?

React. It will allow you to develop desktop/mobile web apps, native mobile apps, and even Windows applications using react-native-windows.

What’s next?

Progressive Web Apps are the next stage in web frontends. It deserves its own series of posts.

This is the 3rd post of the series, Part 1, Part 2, Part 4.

Ok, so now initially loaded web pages have almost no HTML code, but have tons of Javascript and CSS instead. This is good, because these assets could be served from CDN which in theory makes the whole page load much faster.

But the page load time is not the optimization objective. What really matters is the time that it takes for the page to become usable, in other words - when users can start consuming the content on the page.

So besides the time that it takes to load all of the assets, we also have to consider the time spent inside the Javascript to fetch relevant data using APIs and to render it on the client side by updating the DOM. It’s user CPU time that renders the content in this case. User CPU seems free from an application vendor perspective since the user pays for it and for the electricity to power it. But that’s not 100% true.

The first iPhone was launched about 2 years after the original AJAX piece was published. And that triggered a new epoch of mobile browsers. But mobile browser CPU time is not free. It doesn’t cost money directly. The price is the user’s disappointment with battery life. Now users don’t blame lazy developers who wrote suboptimal code, they blame mobile device vendors for using bad batteries.

Anyway, Prototype JS was released in the same month as the AJAX article and attracted a lot of attention. It allowed direct DOM manipulation, contained cross-browser abstractions, and was bundled with its own Javascript effects library. Prototype JS was probably the most important advancement in frontend development since the invention of CSS in 1996. In any case, the first version of jQuery was released 18 months later. It becomes a de-facto standard for the next 9 years because it was direct DOM manipulation done right.

A crazy mix of server-rendered HTML pages and lots of jQuery based mostly on spaghetti code to update these pages, plus a few JSON/XML APIs here and there, was characteristic of Web 2.0 development for many years. By that time, the prestige of frontend development had significantly declined. Backend engineers looked down on HTML/CSS/JS folks that spent most of their time showing and hiding divs and changing the colors of different elements.

Barack Obama inaugurated as the 44th President of the United States of America just 4 months before the first release of Node.js. Node.js was accepted quite sceptically as a nice try to bring Javascript to server side, and there was no significant adoption of Node.js in web development. Probably a release of Express a year later became a trigger of a wide adoption of Node.js. Today Node.js is a quite popular choice for backend development, especially taking into account that modern frontend frameworks allow the same Javascript code to perform rendering on both sides: server and client.

The state of frontend development was now where backend development had been in the late 1990s - a zoo of approaches and technologies. Different groups tried to come up with a frontend framework that would straighten out the mess. Jeremy Ashkenas came up with the most successful one at the time, Backbone.JS. Released in 2010, this client-side MVC framework restored some order to jQuery-based frontend apps. A few years later, Marionette came along to attempt to enhance the functionality of BackboneJS and to become a Rails-style opinionated frontend framework.

Then more and more engineers began to develop frontend-based apps. And the fun was about to begin.

This is the 2nd post of the series, Part 1, Part 3, Part 4.

So the main question is - what does the backend code do in order to render its output? Static assets aside, the response will most probably include data that was fetched from some sort of database. If the output is a full HTML page, it should also include proper HTML markup around the data. This is called server-side rendering because the content of the whole HTML page is rendered by the server.

The bigger the HTML page the more expensive rendering will be.

In earlier web applications, each request type was handled by a separate script file. The script was interpreted line by line to render a web page. Several approaches were introduced to make the code more maintainable and MVC was one of the most successful ones. It’s worth mentioning that Rails, a Ruby-based MVC implementation that was initially released the same year that Zuckerberg launched Facebook, contributed significantly to the wide adoption of the MVC design pattern in web development. Model-View-Controller frameworks for many languages were released in the late 2000s.

MVC separates the concerns of the backend code. Requests are handled by a controller, it uses models to fetch data. The data is passed to views which are responsible for rendering pages. It’s a much better solution than a single script file that does all of the above. But tons of CPU and memory are still used to prepare HTML pages that became bigger and bigger.

And then along came Asynchronous JavaScript + XML, aka AJAX, almost nine years after the FastCGI specification was published and in the same year that the 3rd episode of Star Wars was released. The AJAX approach suggests fetching extra data from the server to update the current screen without reloading the entire page.

Web servers can render many types of content in response to an XMLHttpRequest - including HTML segments that can replace an existing part of the web page, Javascript code that can do anything (including UI effects and replacing parts of the HTML page) once it is evaluated by the browser, and pure data that is serialized in XML/JSON format.

Javascript code running in a browser uses XML/JSON data to update the content of a page. Beforehand, Javascript was used mostly for UI effects. This marked the beginning of a significant shift in the concept of web development. It was the beginning of client-side rendering. This shift actually affects backends as well, that no longer have to render expensive HTML pages. Instead, their main function is serving APIs. It almost makes the V-portion of the MVC framework redundant, because JSON format doesn’t include anything but the data itself. Now server CPUs and memory can be used for better purposes.

Two months after the end of WWII in Europe, Vannevar Bush published an essay called As We May Think. He introduced a concept called memex, which became the forerunner and inspiration for hypertext.

Forty-six years later, Tim Berners-Lee released the very first web server, called CERN httpd, and a browser that worked on NeXT. Later that same year, Nicola Pellow developed a text mode browser for other platforms. At the same time, on the other side of the planet, Pablo Escobar surrendered himself to the police. CERN httpd’s latest version 3.0 is available on GitHub.

Two years later, NCSA published a specification for calling command line executables. The output of these executables could be rendered back via the web server over an HTTP protocol as a response. This was basically the birth of the dynamic web and ultimately resulted in a formal CGI standard.

Three years of extensive use of this solution showed that launching a separate process for each request and tearing it down at the end of the request was a waste of resources. Let’s ignore the forgotten Netscape server API for a minute and note that Fast CGI was the greatest achievement since CERN httpd. Requests from the web server could be routed to a FastCGI server (via a socket, TCP or named pipe). The FastCGI server keeps data-rendering processes running for a series of requests, so that responses are returned to the web server and then to the client. This approach significantly reduced server load and response time.

Another popular approach that was actively developed during that time is called embedded interpreters. Some well-known examples are Apache’s mod_perl (released in 1996) and mod_php. They basically keep the interpreter running constantly in order to save launch/tear down overhead and to transfer the script code to the interpreter process, which in return renders back the response body. Interpreters usually have access to the web server’s internal APIs and act as extensions of the web server.

CGI, FastCGI and embedded interpreters are still widely used today (Apr 2018).

But all this has nothing to do with frontends. I just mentioned it to give you an overview of how backends render their outputs to a browser. Of course I skipped some basic things like sessions, caching, reverse proxies, database connections because they are less relevant to the big picture.

The big picture is quite simple. A request is received by a web server, which somehow gets the output of the backend application code and renders it back to a client application. In most cases that client application is a browser. As for static HTML / CSS / Javascript assets, the backend application code just reads content from a file (database, Redis, Memcache, tape, punch card or whatever storage is used) and sends the content back.

This is the 1st post of the series, Part 2, Part 3, Part 4.

AI-based names generator.

Earlier this months we released noname, an AI-based project names generator.

It uses a neural language model trained on CrunchBase data.

There will be a separate post(s) covering the whole flow of preparing a data set, training a model, serving a model, etc.

The backend is a CherryPy-based server serving JSON API to make predictions based on models implemented in Keras with TensorFlow backend.

The webapp is implemented in React obviously ;-)

READ MORE

Building and deploying React applications.

Another presentation I was giving at Applied Materials office about React applications.

It’s trivial today to start writing and debugging some React code, but it’s not 100% clear how to properly deploy the application, manage versions and what implications that has on the build configurations. Especially if you want to allow different versions for different users in order to perform some A/B testing, testing new features in production environment, come up with some UI experiments, or gradually roll out new features for a subset of users.

In this presentation I hopefully covered all that.

Code is here. It shows the Rails example but it’s super easy to do the same in Node or Python, slides cover the differences.

READ MORE

Machine Learning: Make Your Ruby Code Smarter.

I was giving this presentation at RailsIsrael 2016 conference. I covered the basics of all major algorithms for supervised and unsupervised learning without a lot of math just to give the idea of what’s possible to do with them.

There is also a demo and ruby code of Waze/Uber like suggested destinations prediction with fast neural networks on Ruby.

Slides are here.

Code is here.

Video and screen cast should be published at here shortly.

READ MORE

Migrating from Flux to Redux.

I was talking about migrating from Flux to Redux last Wednesday at Reacts Israel meetup.

Video and screen cast should be published at ReactJS-IL shortly.

TL;DR: When I started to work with React back in Apr-2015 there were many libraries to manage the application flow. I decided to start with classical FB’s Flux implementation to understand what’s missed there. Eventually react-redux and redux solved most of issues I had with Flux. This talk is about practical aspects of migration from Flux to Redux.

Slides are here.

Code is here.

Start with tag #flux, then #redux, then switch to master branch.

READ MORE

Content Creation Flow (5 mins reading time).

Today we’re going to talk about an effective way of defining new product features.

A product feature can be defined in two ways – from either a marketing or engineering perspective. The marketing approach means explaining how the feature benefits the customer, and the engineering perspective means explaining how that feature works.

Some product managers may miss this distinction and explain a new feature to their engineering team from a marketing perspective. As a result, engineering may work really hard and possibly proceed in the wrong direction, losing time and money for the company.

READ MORE

There seems to be quite a few issues with Homebrew compilation after upgrade to Yosemite.

While some of them are easily fixed by upgrading relevant GCC packages, one problem kept me from upgrading my macvim for a while.

Short version: if after upgrading all the gcc related packages you still get errors on Yosemite, try upgrading python as well.

Read more for details…

READ MORE

We usually use dragonfly to handle user generated assets in almost all the projects. But sometimes dragonfly with ImageMagick doesn’t play nicely in a limited environments like heroku.

We were getting tons of R14 - Memory quota exceeded errors after analyzing even small images using ImageMagick’s identify command.

Here is how we solved it.

READ MORE

I’m going to start a series of short digest blog posts that will cover a few things worth mentioning. I sumble upon a lot of things reading different sources, here I will share the most interesting ones. Well, at least most intersting for me.

READ MORE

Boris recently purchased iA Writer to edit Markdown, which is our primary format used internally for readmes, proposal documents, contracts etc.

iA Writer looks very nice indeed. The typography is beautiful, and I especially like how it outdents headings and lists:

Ai Writer Formatting Example

Still, I can’t help but find it impossible to do any serious text editing without the full Vim power by my side.

READ MORE

Stop using strftime. Seriously. At least if you are using Rails that is.

Rails, or rather, its I18N dependency, has a much better alternative I18n.l. The great thing about it is that you provide the name/kind of the format that you want separately of the format itself, so that you can, for example, change it completely for the whole application, or for a different locale.

READ MORE

Lately, my prefered Postgres distribution of choice for OSX is Postgres.app.

Its very easy to download and install (just drag-n-drrop, like most other OSX Apps), no need to wait for it to compile, and it comes with a nice menubar icon for control.

In its default configuration it only listens on a port, but not on a unix socket. The problem is, Rails recipes with postgres create a config/database.yml file that assumes a socket presence.

READ MORE

I recently had an interesting bug that I want to share.

READ MORE

Astrails, the oldest, most renown, experienced and just plain awesomest Rails development studio in Tel Aviv is looking for an experienced, nay, fuck experienced, passionate web developer.

We work with Rails since 2005, done more than a hundred projects for startups from all over the world and work with the newest and most interesting technologies around. We constantly speak at conferences and literally wrote a book about Rails.

We are 7 industry veterans, have shitloads of knowledge accumulated and happy to share it. We routinely do code reviews, pair programming and automatic testing. We work with best tools money can buy and have unlimited educational budget for everyone.

Long story short, if you want to learn and advance as a developer, there is no better place to be, period.

We’re looking for a web developer that loves the craft. If you can loudly argue about advantages of client vs server side rendering, NoSQL vs relational DB, Ruby vs Python, do apply, you’ll find who to argue with here :)

If your idea of a job is punching a card and being done with it, go to Microsoft or something, it will not work out here. But if you’re enthusiastic about technology, spend your time reading dev news, come talk to us, we speak the same language.

What you get:

  • You will work with cutting edge technologies and people that care about them
  • You’ll get to know a lot of emerging startups, the world startup scene and never get bored
  • You get a Macbook Air, 27” kick ass Apple Cinema Display and an Apple keyboard and mouse to go with it
  • You will work in a cool office with a fridge full of good stuff and the best coffee we can find

What we want:

  • some 2-3 years of web development experience, if it was Ruby or Python - big fat plus
  • strong understanding of front end development, JS, jQuery, Backbone.js, HTML5, CSS3 should be something you can tell us about
  • we will strongly prefer someone who has github account, contributes to some open source project, did some pet projects at home, runs a blog about development, tweets about related stuff, you get the idea.

Sounds like your cup of beer? [email protected]

READ MORE

A while back Vitaly wrote a post about LaunchBar. One of the feedbacks we got was to try out Alfred.

After checking it out we switched.

Alfred is an app launcher and then some for OSX. In the version 2 released not that long ago they added brilliant feature - possibility to create your own workflows using nice and simple UI and share them with everyone.

The one workflow I find particularly useful is the Alfred Github Workflow.

READ MORE

The June 2013 DevCon event took place on June 20. We sponsored the event, as we always do. Also Vitaly gave an overview talk on RubyMotion.

Check out the talk

READ MORE

Lean Startup Machine is coming to Tel Aviv this summer. Signup for a chance to win a free ticket.

Lean Startup is the hot new “thing”. Its a practice that lets entrepreneurs build successfull startups in the most efficient way.

READ MORE

New version - 0.3.1 - of astrails-safe released.

New stuff:

  • Internally switched from jeweler to bundler. Should not matter for users, but be sure to report any strange behaviour.
  • Plain FTP support, before that we only supported SFTP - contributed by seroy
  • mongodump support - contributed by Matt Berther

Thanks guys for your contributions.

READ MORE

The are multiple ways of configuring your Rails application for different environments (e.g. staging, production, etc). One of the popular ones is through environment variables. For example Heroku uses this type of configuration extensively.

We extracted a small gem that will allow you to manage it effectively.

READ MORE

The Rails 4 Way on Leanpub.com

We are proud to announce that our own Vitaly Kushner co-authored the new edition of ‘The Rails 4 Way’ together with Rails legend Obie Fernandes of Hashrocket fame.

‘The Rails 4 Way’ is the latest edition of the most comprehensive, authoritative guide to delivering production-quality code with Rails 4.

READ MORE

Pow is great. The single thing that bothered me was problems with using debugger while pow’ing away.

Did you ever put a debugger into your controller, connected with rdebug, hit refresh but it didn’t stop?

The problem is most probably with POW_WORKERS setting. You see, by default, pow will start 2 ruby processes per application.

READ MORE

About half a year ago Vitaly posted a post about how simple it is today to use ruby patches bundled with rvm installation to dramatically reduce big rails app loading times and make your dev environment a much happier place.

Since then Ruby advanced with new patchlevels and there are new patches to use, so let’s go over this once again.

READ MORE

Back in February we sponsored a great technical event - Reversim Summit 2013

Now the organizers uploaded videos from all talks to youtube, so go check out a lots of quality technical content

My personal favorite - How To Fuckup, by Yosi Taguri

READ MORE

I was frustrated by ⌘Q and ⌘W proximity for a long time. Long, long time. Seriously, long time.

It hits me the most with browsers since I usually open and close quite a lot of tabs during the day. And I tend to do it from keyboard, so sometimes I just hit ⌘Q when I only intended ⌘W.

It just happened again.

But this time I suddenly realized that I can easily remap it. I was using this OSX feature for other things, like remapping useless since the typewriter days Caps Lock key, but somehow missed that I can fix this annoying problem too.

If not universally then at least in Chrome (or any other application if needed).

This is really easy:

READ MORE

Rails Conference 2012, first time in Israel, was a great deal of fun. Lot’s of presenters both local and from all over the world, well, more like from all over the world of Rails. There were talks from Github, Heroku, Engine Yard, Gogobot, Get Taxi and lots and lots of others. Solid organization from Raphael Fogel People and Computers guys. Hordes of interesting people to talk to, nice and abundant food and coffee, lots of great content from the speakers and to sign off the day Github guys invited everyone to an open bar drinkup event.

We gave 2 talks, Vitaly’s “Performance - When, What and How” and Boris’ “Rails Missing Features”. Check out slides and videos of those talks.

READ MORE

nanoScroller.js - jQuery plugin to implement OSX Lion-styled scrollbars for your website.

strong_parameters gem allows you to “test drive” the new way that Rails 4 is going to treat parameters security. attr_accessible and friends are being deprecated.

celluloid.io interesting approach to multithreaded programming for Ruby.

Letters - new take on debugging logging library for Ruby.

showcase of 40 pricing tables and signup pages can help with with some inspiration for your pricing page.

lenticular.js - Tilt controlled images.

Repo.js - light-weight jQuery Plugin that lets you easily embed a Github repo onto your site.

FullCalendar is a jQuery plugin that provides a full-sized, drag & drop calendar with events etc.

tl;dr Legal - easy summaries of open source licenses.

CCMenu - OS X menu bar application to pull build status of your projects. Support many different CI backends.

READ MORE

UPDATE [30 Apr 2013]: The new, updated and faster version of this blog post covering Ruby 1.9.3 patchelevel 392 and railsexpress patch set.

I knew that there are various Ruby patches available but I’ve never tried them as I didn’t want to waste time for something that I thought I don’t really need.

Then I found out that rvm comes bundled with patches ready to be applied, so I’m just a simple command line away from having a patched Ruby. Don’t know how I missed that before.

READ MORE

Finally, there is a Rails Conference here in Israel. Long overdue. We’re sponsoring it and giving one keynote and one lecture.

READ MORE

I recently switched to ruby 1.9.3 as my deafult ruby verison, and suddenly some of my scripts started to fail in some funny ways.

One of the latest ones was the script that was supposed to change ‘updated’ timestamp in a YAML formatted file. Instead of the current date it started to spit out binary strings.

The problem is quite complext but the fix is simple…

READ MORE

I did an overview presentation about the current state of real time web and server-push technologies at the Israely DevCon 2012 conference.

Below is the transcript of the talk (actually more like a talk plan ;)

There is also a pdf version for download.

It is in English as this is the way I usually write down my presentations, although the actual talk was delivered in Hebrew.

Check out the video of the talk on YouTube or embedded here. And if you more of a reader then viewer you can check out the slides with sort of transcript below.

READ MORE

Given that module Foo is defined elsewhere what is the difference between this snippet:

class Foo::Bar
  ...
end

and this:

module Foo
  class Bar
    ...
  end
end

Answer inside ;)

READ MORE

LaunchBar is one of the tools I can’t live without.

Basically, it’s an application launcher, but besides actually launching an application it has lots and lots of features that help me complete tasks on my laptop while staying in the flow.

Ever since I installed it on my MacBook my workflow changed quite dramatically to the better.

READ MORE

My Vim-fu improved a lot in the last couple of years.

Part of the reason is that working on dotvim forced me to dive deeper into it, but thats not the whole story.

I think a much bigger reason is that I decided to systematically work on improving it.

One of the tricks I use is to have a list of Vim tricks and shortcuts that I’m learning right now on my OSX dashboard.

READ MORE

It’s alive. Again ;)

This blog was dead for a while. It was running on an old Mephisto system and it’s admin interface just broke one day, throwing some cryptic exception.

It was probably not that hard to fix, but every time I thought to write a blog post it was like “oh, I have to dig into this antient codebase to figure out how to fix it before I actually get to write anything. I’ll pass…”

So days become weeks, and weeks become months, pretty fast its a year that passed by with no blog posts whatsoever.

Meanwhile I was scribing my thoughts on future blogposts in markdown files on my harddrive.

Not long ago we finally decided to do something about it.

READ MORE

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 to sleep, signed a contract for developing killer web app at 1:30am, and finally gave a presentation at The Junction at 4:30pm.

READ MORE

Vitaly gave an interesting presentation about MongoDB at Database 2011 Conference.

MongoDB. NoSQL for SQL addicts.

Slides are here.

READ MORE

We presented on IGTCloud Ruby On Rails Day today.

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 MORE

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 :`.

READ MORE

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

READ MORE

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

READ MORE

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.

READ MORE

A few days ago I gave a presentation about Ruby for Sayeret Lambda discussion group.

The title was “Ruby is an acceptable lisp” but the message is better served by “Ruby is Better then Lisp … sometimes” :)

READ MORE

http://markupslicer.com

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

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

READ MORE

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

READ MORE

There is a new (0.2.7) version of Astrails-Safe.

READ MORE

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.”

READ MORE

The opportunity

120 happy dreamers cooking for 54 hours of pure startup joy, well-fed and ready to work. Of course, I’m talking here about Startup Weekend Israel.

The challenge

Come up with an idea that can be implemented in a couple of days, yet is so cool, so innovative, and so useful that I could attract the best of the best.

Read the rest at blogtheblog.jobthejob.com

P.S Now we have some pictures too there, you should check it out

READ MORE

If you follow us on twitter (@astrails if you wondering) you already know that we are at the Startup Weekend Israel right now.

Which is going amazing by the way, thanks for asking, lots and lots of nice people, very creative and energetic atmosphere, food and beer.

Turns out our idea attracted a great team of developers, designers and business developers.

READ MORE

We just started a project for a client that involves Cassandra.

If you’ve been living under a rock and don’t know what Cassandra is let me tell you :)

Cassandra is a “second-generation distributed database” that was built for web scale.

Its is one of the many distributed nosql databases that appear everywhere lately like mushrooms after a heavy rain :).

What sets Cassandra apart is that it comes from a recognizable entity - Facebook.

But I digress.

This is not meant to be a Cassandra introduction, there are enough of those on the net. I Just created a new nosql section on this blog where I’m going to post various tidbits of information about cassandra (and probably others) as I learn them while working on this new project.

Here is the first one: Cassandra gem is just an installer

READ MORE

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 MORE

Just released a new 0.2.5 version of astrails-safe.

astrails-safe is our very simple to use backup script for mysql, postgres, filesystem, and subversion. It can store your backups locally, on Amazon s3 or on a remote SFTP server. Optional GnuPG enctyption completes the picture.

READ MORE

Since Github stopped to build gems we are moving to the gemcutter.

READ MORE

Damn, I just found this unpublished article in the blog admin…

How come it evaded my attention for 3 months??!!

Anyway, releasing it now thought this is all quite old news, going to announce 0.2.4 in a moment :)

READ MORE

I just did something pretty stupid. I edited /etc/sudoers file directly from within my non-root user account.

READ MORE

This is going to be the first part of a blog post series about javascript widgets.

First type I’m going to cover is Popup Widget. Sometimes it’s called Popin Widget because there is no actually new window that pops up, instead the content is shown IN-side a current page. The idea is quite simple: you provide some html/js snippet to other sites. They put it into relevant place, and you have some functionality of your site running there.

READ MORE

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…

READ MORE

I just pushed new version 0.1.9 of astrails-safe to github.

The main difference is a fix to an embarrassing bug in the S3 backup rotation code.

Thanks to Thuvarakan Tharmalingam for reporting.

Again, the reason it escaped was the fact that we don’t yet have full test coverage.

We are getting there though….

READ MORE

It looks like our astrails-safe gem is quite popular :). People started to contribute new features:

READ MORE

Mephisto commenting system is… how do i put it … outdated :)

And we wanted something more engaging for our blog. Looking around the web we found that Disqus was used all over the place, so we decided to integrate it into our blog instead of the native comments system.

READ MORE

Wouldn’t it be cool if you could just require “http://my-host/my-lib.rb” in ruby?

Now You Can! Using our “http_require” gem! :-)

READ MORE

Everyone needs a backup, right? Unfortunately almost no one does though. Why?!

We needed something for ourselves and our customers. Something simple, free, configure-and-forget. Most of the time there is no need for something fancy, a simple tar + mysqldump can do the job for many small/medium sites.

READ MORE

RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. Use it to write your custom monitoring shell scripts or create whole applications using its Perl, Python, Ruby, TCL or PHP bindings.

Let’s run it with Ruby on Leopard.

sudo port install rrdtool

Default ports installation comes without ruby bindings.

READ MORE

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.

READ MORE

We recently moved our DNS to dnsmadeeasy.com from godaddy.com name servers.

After the transfer some internal CNAME records had a problem. So after fixing the problem and checking in the terminal that the changes propagated to the DNS server (host xxx.astrails.com) I tried to type the address in the browser, but it kept giving me the “can’t find host” error.

READ MORE

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.

READ MORE

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 MORE

2008 was the year when we finally switched to full time consulting. And like all consulters we faced the problem of correct pricing. There are two well-known ways to charge a customer: per-hour rate and fixed bid quote, and several combinations of them.

READ MORE

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 MORE

This blog-post is mostly targeted at non-Rails developers. Rails devs should know all this by heart :) Many times we need to explain to our customers what is ‘proper deployment’ and why their current one sucks :) Now we’ll be able to just point them to this post…

READ MORE

Blog moved to Mephisto. So we have comments now.

READ MORE

In the process of installing Mephisto I’ve got a problem with image_science gem.

It installed OK but when trying to require it the was a problem with RubyInline compilation:

READ MORE

We really like Debian and we usually use the current “stable” distribution for our production servers.

It all works great with one little problem: if you need very current soft it is probably not in the ‘stable’ yet.

The current Debian stable (“etch”) includes rubygems 0.9.0-5 which is way too old.

We needed to upgrade to at least 1.2.

READ MORE

We just incorporated our own Ltd. company.

It was coming for a while now but we finally got to it when we started to hire people :)

READ MORE

Once again I’ve hit a problem of installing gems on a machine with very little memory.

READ MORE

On one of our projects we needed to do some caching for an action with an expensive db query. Fragment caching took care of the rendering but we needed a way to skip the db if we have a cache hit. And checking for an existence of the fragment file in the controller just didn’t seem right.

READ MORE