Reflections on RubyConf 2013

Last weekend I had the great privilege of attending RubyConf 2013 with a few of my co-workers from RentPath.

This was the first major software development conference I’ve attended in many years. It was a great opportunity to meet the luminaries of the Ruby development community, including “Matz” himself (Yukihiro Matsumoto, the creator of Ruby).

The presentations ranged from fairly technical (details about new features and performance improvements in Ruby 2.1) to mildly entertaining (11 year old Katie Hagerty sharing her experiences with KidsRuby). Some highlights for me were Luca Bonmassar’s overview of Elasticsearch, Michael Fairly’s rapid game prototyping demo (writing a working Pong implementation using Gosu before our eyes in 15 minutes), and Ernie Miller’s talk entitled “That’s Not Very Ruby of You”. It was very inspiring to be around so many smart and talented developers.

Before trading in current market, you have several options for getting out from the curse of impotency, but if you are wondering prescription cialis why to choose only Kamagra then there are suitable reasons for it. The medicine involves active find out this web-site online levitra formulation of Sildenafil citrate which is a PDE 5 inhibitor. Living in modern complex societies involves navigating through a host of cardiovascular symptoms such as * generic viagra prices High blood pressure, high cholesterol* Diabetes, obesity* Arteriosclerosis These symptoms are directly related to blood regulation as well as blood vessels. Online order is a process of a few clicks levitra 10 mg only. The conference was very well organized and well run. The sessions started and ended on time, free hot Starbucks coffee was always available, and the A/V systems worked flawlessly. The free lunches provided were quite tasty. My only complaint was that there was no food provided for breakfast; some simple bagels or muffins would have been great, especially since the only alternative available at the gorgeous, swank Loews hotel was a $30 breakfast buffet. But really, that’s the only thing I can think of that the organizers could have done to improve the experience.

I will say that a few of the presentations seemed a bit under-prepared. In particular, when presenting code examples in a very large space, some presenters did not take font sizes into account. I was a little confused by the choice to let young Katie Hagerty have a keynote spot for a full half hour on Saturday morning. As adorable as she is – and while I think it’s totally awesome that she’s learning to code – I would have preferred something with a bit more substance. (Why not get the creators of KidsRuby up there as well, for example?)

Based on what I saw at this conference, I think Ruby is entering the “awkward teenage” phase of its lifecycle. No longer the “cute new kid” on the block, it’s experiencing growing pains, and some insecurity. The Ruby community is starting to learn lessons from more mature technologies (e.g. metaprogramming is bad, ‘mkay? Garbage Collection is important… etc. ) At the same time, lots of great companies are adopting it and job opportunities are plentiful. It’s an interesting time to be a rubyist!

Why Rails isn’t “just another web framework”

I recently heard a software engineering director candidate with many years of web development experience describe Ruby on Rails as “just another web framework”.

That’s what I thought too, until I spent some time working with it over the past 8 months.

The fact is, Rails is much more than that. It is a radical paradigm shift away from both the bloated, configuration-based methods of J2EE and the chaotic hackfest that is PHP.

Here are my top 3 reasons why I think Rails sets itself apart:

– The ActiveRecord ORM. This is the first ORM I’ve worked with since NeXT’s Enterprise Object Framework that really lives up to the promise of ORM’s, and does so with minimal configuration and fuss.

However, before the treatment of prostate pronblem, we must first of all give a clear definition of a generic drug. viagra active generic viagra online http://www.donssite.com/OPTICALIILLUSIONS/visual-illusions_12.htm Thus, by blocking the functioning of PDE-5, Kamagra enhances cGMP levels, promotes nitric oxide production and fortifies erections. Fragment 176-191 peptide is also available in donssite.com cialis no prescription bulk when needed. It the buy levitra is known as erectile dysfunction ir also known by name Kimmelsteil-Wilson syndrome. – Terseness. The syntax of Ruby on Rails applications is remarkably terse. It can be a bit daunting at first, but after a while you begin to realize what a huge cognitive win this is. Getting rid of all that unnecessary syntactical noise makes it much easier to focus on solving problems.

– Gems. The eco-system of 3rd party components for rails in unlike anything I’ve ever seen in any development community. There are some truly remarkable gems, such as this one for authenticaion, or this one for creating seed data for your project. The time savings these gems provide cannot be overstated. And it’s fascinating to watch how the Rails community seems to converge on certain gems, which become almost part of the “standard”.

Rails is making web development fun again. I’m so glad I jumped in the pool – the water’s fine!

 

 

PHP array_key_exists vs. isset()

Which of these PHP statements do you think is faster:

array_key_exists($key, $array);

vs.

isset($array[$key]);
This particular issue has a complete negative impact generic viagra samples over your life. You need to consume one Spermac capsule and one Vital M-40 capsule daily twice with plain buy tadalafil cialis http://travishartley.com/pages/video-left-2 water or milk after intake of food. Apart from curing reproductive disorders, daily intake of withania somnifera extract is found to be very useful for improving the quality of erection at the time of viagra properien http://travishartley.com/pages/video-left-2 intimacy. Impotency: It cialis levitra generico is directly related to anxiety regarding sexual performance.
??

If you said “isset”, you’d be right! It is approximately 60% faster, as others have noted.

This is counter-intuitive, and seems like a very easy optimization could be made to bring the performance of array_key_exists() up to par with isset().

Ruby script for extracting email addresses from a text file

Here’s a handy Ruby script I wrote a few months ago to extract email addresses from a blob of text.

In this case, all of the email addresses are surrounded by angle-brackets, so that makes the script much easier.

It’s kind of trivial, but a nice little example of the elegance of Ruby:
This can cause frustration, anxiety and disappointment, which can result in erectile cialis price dysfunction. If left untreated, it can also lead to mental and emotional conditions in men such brand viagra 100mg as anxiety, stress and depression in some cases. Vertebrae buy viagra online in have a pad in between each bone called a disc to cushion the movement of the spine. You are advised to engage in lovemaking with usa generic viagra trusted female only.

#!/usr/bin/ruby -w
IO.foreach("data.txt") {|line|
    line.scan(/<.*?@.*?>/).each{|addr|puts(addr.delete('<>') + "\n")}
}

WordPress Upgrade Hell

My blog was starting to have major problems recently – most notably, Akismet stopped working, and the spammers were getting through again. I tried to upgrade WordPress, but my database was out of date.

So I finally bit the bullet and did a clean install of the version of WordPress supported by my hosting service, and began the painful process of converting my data to the new version.
This condition can be either a permanent impotence or even temporary which is the lack of erection. prescription for ordering viagra There are other conditions wherein use of cialis samples free has proved to be helpful. Tadalafil Just like the many drugs that have been discovered under the cheap viagra order antibacterial class but Zithromax is tested to be the best. Ultimately, it could be good alternate to switch the popular blue pills to the best prices on cialis videoleadspro.com time tested and natural Epimedium.
I’m in the process of restoring things (my user table for example). So if you want to leave a comment before that happens, you might have to sign up again. Very sorry for the inconvenience!

How to Read ExtJS documentation

I’ve been working with ExtJS now for about 7 months. It’s an amazing library for building Rich Internet Applications in Javascript, arguably the best available. However, as I’ve blogged about previously, the API is so huge and rich that it can be hard to find what you’re looking for.

For example, here’s a problem I ran into today:

– I note that a long field label is wrapping and would like to fix this.
– checking the code, I see this is an Ext.form.Textfield inside an Ext.form.FormPanel
– using Firebug I see it has a width of 100px. I verify that setting it to 200px fixes the wrapping issue.
– I check the Ext.form.Textfield docs.* No obvious way to set the width of the fieldLabel.
He was really feeling ashamed of himself because of this. order levitra The condition pill viagra is common in women than men. Good circulation protects the blood from the achat cialis cipla harmful effects of excessive alcohol intake, people continue to consume alcoholic drinks in social and cultural settings. So consumption of an extra pill within the 24 hour interval can lead to risks of overdose. online cialis prescription can be purchased online from the very reliable thepharmadrugstore.com. – try setting autoWidth: true on the Textfield. no change.
– try setting grow: true on the Textfield. no change. although not specified in the docs, these properties seem to apply to the field only, not its label.
– try google: “Ext.form.Textfield change fieldLabel width”
– found forum post that refers to the “labelWidth” property of Ext.form.FormPanel. Voila!

*Here is where I made my mistake. I assumed Ext.form.Textfield would contain the property to control its labelWidth, but it was actually the FormPanel that controls this for all of its elements. This is a common pattern with ExtJS – if the property you’re looking for isn’t on the object you expect, check its “container” object.

Of course I still don’t know how to override the labelWidth for a specific TextField, but I’m sure it’s in there somewhere…

MySQL and the perils of Going Rogue

Since the mid-90’s, I’ve worked fairly extensively with nearly all of the major Relational Database vendors: Oracle, Sybase, SQL Server, DB2, and MySQL. (Even dabbled a bit with Postgres.) I’ve been able to do this without too much trouble because, until fairly recently, the SQL implementations provided by the various vendors were not that different.

Over the past few years though, I’ve noticed more and more deviations from standard SQL coming into play, mostly from MySQL. I’ll admit I do not follow developments in the ANSI spec process, so some of these may be SQL-92 standards, but I suspect most are not. For example, take “INSERT IGNORE”. As others have noted, this is useful for developers, but it’s non-standard, and therefore not easily portable. Another example is “GROUP CONCAT”, which has created major headaches for some developers .

Oracle of course has its share of non-standard operators as well, such as “MINUS” and “INTERSECT”.
It includes one more reason that is if a person is not able to have a firm erection and this happens when pumping of blood is not viagra on line proper. Shigru cialis super active is also beneficial in urethral strictures and diabetic nephropathy. If purchase levitra online http://canterburymewscooperative.com/item-1483 is know the exact cause, can be indicate the correct treatment. It consistently improves the body’s natural production of insulin, hence, maintains the energy levels of body. generic cialis cipla
One could certainly argue that vendors are merely being “innovative” here, but one has to be careful when choosing to use these non-standard features. MySQL does not clearly point out in their documentation when they are deviating from SQL-92. Unless you are very certain that you will never need to run your code on a new database, these functions are probably best avoided if possible.

Reponse to Mike Kimsal (Java vs. PHP)

My friend Mike Kimsal wrote an excellent post on his blog today about the pros and cons of learning new programming languages. It inspired me to leave the following reply, which I decided to post here.

I’m not sure if I’m the friend you were referring to who was “forced” to move from Java to PHP and is now loving it (paraphrasing), but that is sort of my situation. PHP (or perhaps more accurately, the entire LAMP stack) is now the 3rd web dev stack I’m working with, having started out with Objective-C and Apple’s WebObjects (which spoiled me for everything since), then moving to J2EE. All of these environments have their pro’s and con’s. In my case, learning these new languages was literally a matter of survival. I have a few “die hard” friends who refused to acknowledge that Obj-C/WebObjects was dying, who are now struggling to make a living writing apps for the Mac and iPhone. I’m also starting to see the writing on the wall for J2EE. Certainly one can still make a good living with Java, but fewer and fewer new projects are using it. Eventually (and this has been said before), Java will become the next COBOL.

PHP is popular among web developers in part, I think, because of its similarity to Javascript, both in terms of the “dynamic” nature and even the syntax itself which is pretty similar. Many Web developers seem to be allergic to compilers, whereas I am still a big fan of them, as long as they are lightning fast and rock solid (which has been the case with Java for some time now).

In terms of productivity, I have come to realize that with PHP you are trading off speed for maintainability. It’s very easy to build things quickly with PHP, but fixing bugs and maintaining the code is very hard, because the dynamic, loose typing means the IDE and compiler cannot help you navigate the code or automatically find problems in it. For example, there is no easy way to definitively find all usages a given PHP method, even with PHP5 and the latest IDE’s. The fact that you can define new variables on the fly means you can easily create bugs like the following:
This medicament cipla india viagra is exceptional to all men on account of its structure, Kamagra Oral Jelly is ingested rapidly without creating aggravation of the digestive nutritious waterway, which was the primary detriment of “standard” Kamagra. Just like how Zenegra anti-ED pills can enhance erections by dilating penile arteries, coffee can work a natural way of doing so too, with only two to three or three to five cups each day. robertrobb.com prix viagra cialis Experts say that even if there are no apparent issues related to urinary track, men should get an annual checkup done from expert urologists so that sildenafil 100mg tablets problems can be cured in order to be a man free from it and it requires constant care. Other lowest price cialis are intraocular pressure, retinal vascular disease and other eye problems such as increased sensitivity to light or sound Sweating So, visit the reputable and trustworthy health care professionals who have the required knowledge and expertise on how to perform spinal manipulation efficiently and safely.
$user->getEmployee($id);

If $id has not been defined, PHP will just go ahead & define it for you on the fly. In Java, this statement wouldn’t even compile if $id hasn’t been defined yet.

So PHP requires more cognitive overhead while you are writing the code as well. I find with Java I can write code more confidently, so even though I have to write more of it, I generally feel more certain that the code is going to work, whereas with PHP I often find myself having to think a lot harder and tread a bit more carefully. Surely that’s just lack of familiarity to some extent, but I do think the languages themselves have some strengths & weaknesses. Basically I think PHP is great for new “startup” projects that may have a short shelf-life, whereas Java is better for very complex projects that are going to be around for a very long time.

Raleigh Street Name Generator

I wrote a javascript street name generator for the City of Raleigh today during a coffee break.

I hope the City finds it useful. 🙂
Dislocations or prior fracture of the elbow Arthritis or bone spurs of the elbow Swelling at the elbow can be due to many reasons The ulnar nerve stretches around the bony ridge of the medial epicondyle, when we bend our elbow. acquisition de viagra One such challenge men face in the bed all the time and hates going for some physical work, his laziness may be the answerable This drugstore on line viagra for the same condition. Physical causes usa discount cialis of penile dysfunction are difficult to overestimate. So in essence generic versions of cialis generico canada will contain the same active component i.e.
(The Towns of Cary and Apex can use it as well, of course.)

CSS overrides in IE

Today I learned a very important lesson about how CSS overrides work (or should I say DON’T work) in IE.

When attempting to override a CSS class property in IE,  you must first “re-set” the property to its default value.

This is demonstrated in the following code:

<style>
.textBlock {
     white-space: nowrap;
}

/* the following is required for IE;
     otherwise IE will ignore the white-space declaration in the next block.
*/
.textBlock {
     white-space: normal;
}

.textBlock {
 white-space: pre-wrap !important;
Since, it inclines to improve discount viagra http://seanamic.com/contact/ the situation by enhancing the sensitiveness of our body cells towards the use of insulin. If this is the case there could be some serious underlying symptom that canadian pharmacies viagra  could be causing it. Recently, one question "I suffered from painful sex, and  lowest priced cialis what can help in such condition. The work is almost the similar in  cialis india price all respect.  word-wrap: break-word;    
}
</style>

You can see this in action here.

I applied this in creating the following CSS which enables word wrapping for ExtJS ListViews, GridPanels and Combo lists:

.x-list-body dt {white-space: normal;}
.x-list-body dt em { white-space: pre-wrap !important; word-wrap: break-word !important;}
.x-grid3-cell-inner, .x-grid3-hd-inner{ white-space: normal; }
.x-grid3-cell-inner { white-space: pre-wrap !important; word-wrap: break-word !important;}
.x-combo-list-inner .x-combo-list-item { white-space: normal; }
.x-combo-list-item { white-space: pre-wrap !important; word-wrap: break-word !important;}