Just a quick write-up of my Pecha Kucha talk for RedDotRubyConference last night.
Full “script” below the cut. If you’ve been there in my talk, I ad-libbed a lot more this time around than when I did my Ignite talk.
Form is emptiness, emptiness is form.
Just a quick write-up of my Pecha Kucha talk for RedDotRubyConference last night.
Full “script” below the cut. If you’ve been there in my talk, I ad-libbed a lot more this time around than when I did my Ignite talk.
I just learned recently that there are no local download servers for Ubuntu packages here in the Philippines. In other words, for the past few months (or years), every apt-get install I do downloads the packages from the main Canonical server in UK.
And I thought my slow download speeds were just caused by this country’s crappy internet.
Anyway, the solution is simple. In Synaptic Package Manager, go to Settings -> Repositories and choose Other… from the “Download from” dropdown. This will open the Choose a Download Server window. Just click the Select Best Server and Ubuntu will ping all download servers, choosing the best server automatically.

This will probably select a Singaporean or Malaysian server depending on your connection.
Two days ago, a reader emailed me asking for help on my previous tutorial. There I was able to convert Devise’s sign in form to use Web App Theme’s CSS, but I didn’t provide details on how to style the other form: the sign-up form.
The change required is pretty simple actually, just as long as you understand what I did in that tutorial. First, you need to tell Rails to override Devise’s RegistrationsController’s layout to use the “sign” layout (just as what we did with SessionsController which handles the sign in):
config.to_prepare do
Devise::SessionsController.layout "sign"
Devise::RegistrationsController.layout "sign"
end
Then modify the app/views/devise/registrations/new.html.haml file accordingly. If all goes well, you should get something like:
The steps to convert the “Forgot your password?” page is left to the reader.
Earlier this week, I had to interview a bunch of applicants for a web developer role. The idea is to filter out those who aren’t really experienced as the job asks for people with at least 6 months of experience.
Anyway, below is the test I gave them. I don’t feel like giving something like it again in the future (it’s pretty crappy IMHO) so I think it would be a good idea to share it instead of just throwing it away.
Determine whether the statements below are true or false. Be prepared to explain your answer.
- A primary key can be composed of multiple columns.
- When you have two tables in a parent-child relationship (i.e. one table has a foreign key referring to the other table) deleting a parent record will delete all child records of that record.
- Escaping special characters is the best way to avoid SQL injection.
- You can undo
UPDATEandDELETEchanges to the database.- The
VARCHARdata type can be used to save space when used overCHAR.- When using an RDBMS, normalization must be done for all tables.
- Indexes speed up database actions.
- Foreign keys are usually indexed.
- Many-to-many relationships are implemented via junction/join tables.
- Some HTML elements have been deprecated in favor of CSS.
- The
<strong>element can be used interchangeably with the<b>element.- Under strict XHTML rules,
<br>is not a valid usage of the line break element.- The
hrefattribute of the anchor element only accepts relative and absolute links.- The
imagetag is a block element.- When a form is submitted, the submitted data is derived from only the
inputelements inside theform.- Multiple elements can have the same
idattribute.- Web servers serve content at port 443.
- A web server can identify if a client has visited the website before.
POSTis idempotent.- A browser redirect can be initiated by a response with an empty body.
- In JavaScript, the
varkeyword is optional when declaring variables so it can be omitted in all cases.- You must specify a function name when declaring JavaScript functions.
- Ajax will prevent you from performing other actions until the Ajax action is completed.
- You are limited to using XML in Ajax.
- You cannot change the values of a class variable.
- Constructors are instance methods.
- Polymorphism refers to the ability to define functions to have different behaviors depending on the passed arguments.
- High cohesion and loose coupling can improve coding speed.
- You can combine the features of two classes via inheritance.
- Encapsulation is primarily used for security reasons.
Answers below the cut.