I have to admit I did not paid much attention to podcasts in the past, but for some reason, I came across the Extra Life Radio podcast last week. My life hasn’t been the same ever since. The show is supposed to be about gaming and other aspects of life, such as comics. But for what I have heard so much, the show is about anything that comes to mind between Scott, Brian, Obsidian, and whatever other guest happens to be in the show. The topics are varied and colorful. Although not specially a show for the conservative types, I can’t listen to one without laughing all the way. I highly recommend it! The link is www.myextralife.com
Have you noticed how every time I place an image to the left, the new paragraph tag gets the I (which for some reason I use too much…) on the top and then the image and then the rest of the text. It is not ugly but it does annoy me…
I bought this book about two years ago and then forgot about it.
Please don’t take me wrong, I love reading, but sometimes I buy a whole batch of books, probably when the bookstore is on sale, and end with more books than spare time for reading. I picked up the book yesterday night, and was so immersed in the story, that had to read it all at once. It is truly superb.
The novel is the story of doctor Daniel Da Barca, a socialist Spaniard who is not only a brilliant medic but also a left-wing agitator in Franco’s 1936 Spain. The story is told in flashes by his guard cell (and police informant) Herbal, intermixed with the story of Daniel’s girl friend, and other characters detained in the Santiago de Compostela jail complex.
I don’t want to give too much away of the plot, because, as most brilliant novels on the Spanish Civil War, the plot is either complex or profound. What is profound is the interaction between the characters, perfect examples of the polarization of Spain society in the 1930’s.
Daniel is the typical left wing idealist, a college medic and brilliant at his career, which believes in the communist manifesto and is willing to offer his life in the struggle of the Spain Republic. Herbal plays the exact opposite, the rural boy whose upbringing in a poor (and illiterate) family in Galicia, made him bitter and distrustful, and found as an adult an escape route in the militia. Blindly following the military precepts and catholic precepts of the Franco right wing, we learn of the environment in which the clash of the civil war brewed.
The third element gets incorporated through the other detainees: simple workers and union members, the left wing that had neither cultural baggage or deep idealism, but pushed the political agenda as a way to overcome the predominant status quo of Spaniard society, where the illiterate accepted whatever was norm and brute was deemed better than intellectual.
I read a lot about the Spain Civil War, and the same elements crop time and time again. The father who was more of a brute than anything else; the son who grew under constant beating and oppression; the educated left looking for a social change; the educated right looking for way to further their domination. These are factors in every good novel on the subject, and are indicators of why this society came to an ebullition point culminating in the civil war and the crimes against humanity the secret police perpetrated on the remains of the republic when its right to power was challenged by the left.
I
finally found a theme for Wordpress that I feel comfortable with. It took a long time. Unless you unpack and install the theme, and then try it out with your own posts, you never really know what you are going to get.
But Nightlife has been the one theme I feel reflects my personality and taste.One question for you guys out there: any good plug-in for code snippets? I have found quite a few quirks when using the code tags inside Wordpress.
There is a new model for using scaffold in Rails 2.0. I had no idea that changed (although I did have to change lots of lines in my applications thanks to me not paying attention to deprecation messages from Mongrel.)
It took me some time to adjust to the changes, but now that I saw it, and learned it, it makes sense.
In the old days, when I needed a User database with say, name, email, and password, we would do first the model:
~> ruby script/generate model User
The second step is to edit the migration file like so:
class CreateUsers < ActiveRecord::Migration
# The User class is the doctors who use the system
def self.up
create_table :users do |t|
t.column :name, :string
t.column :password, :string
t.column :email, :string
end
end
def self.down
drop_table :users
end
end
The third step was to run the migration;
~> rake db:migrate
Finally, the last part was to run the scaffold code:
~> ruby script/generate scaffold User
That was the last step. By running the web server you could see your fast application all CRUD included. It was fast and fine, and got a ton of work done with little code.
So it took me a little by surprise that the Rails team decided to do away with scaffold, at least the old model, for a new one. It also made me Google for the new way to do things, but I was very please to try it out.
The new way involves knowing the structure of your model at the scaffold time, which I think it is a very simple requisite, since the model is the first thing everyone plans ahead of time. If we follow the sample above, the code would be
~> ruby script/generate scaffold User user:string email:string password:string
~> rake db:migrate
And that is all! The model and migration are constructed, along with the controller and all the necessary functions inside. It’s definitively easier than the previous way, and although it takes some time to get used to it, once you get the hang, it makes all the sense in the world.
Every now and then I go back to trying to learn Java web programming.
Mine is a long story. I started college a long time ago, and I was going to study CS. I did well, but my parents thought CS was a career that was dead, there were too programmers, engineers, etc. Beside the fact that my parents were off, I majored in marketing and later got my MBA, which is the source of everything evil that happened to me later (and never made any money anyway.
So I went back to college to learn Java. I did great and gained some more credits but I always felt they were telling me half the story. The professors were more interested in the order of the mathematical operators than real life use, such as using ORM or the infamous Java I/O system.
One day I became especially frustrated with object serialization, and in order to understand the subject I took a peek into Python (Bruce Eckel kept saying in his books how good Python was). In took less than two or three days to learn enough Python to challenge my previous Java lessons, and found the language incredibly refreshing and innovative. From Python I jumped to Rails (and then to Ruby, which I think it is the way many people arrived to Ruby) and have been the happiest person ever. Only the combination of Rails/Ruby/community could spring forth the revolution that we have been watching for the last two years.
Yet recently I went back to Java, motivated by the great book Head First Servlets and JSP by Bryan Basham, Kathy Sierra and Bert Bates. I was surprised to learn in the first 100 pages what I was never able to learn in probably 2,000 pages of literature from Sun. I even joined the J2EE with Passion seminars from Sun. I got all the free literature from all the sites and followed the weekly homework, learning that it was a real pain in the butt to make simple Hello World! web application.
It is easy to understand how later I learned Rails over the weekend and never looked back (until last week).
What is amazing is how in the first 100 pages this OReilly book can so clearly and simply explain the basics of Servlets and Java Server Pages. Using examples from old kung-fu movies OReilly does several things rights.
First, they explain web applications in a slow, simple way, without jumping to overly complicated technical jargon ahead of time. I have a book at home that explains the servlet abstract class and its different methods before explaining what a servlet is good for. Instead, HFSJSP takes a different approach, leaving the technical and complicated for later.
Second, they explain the basics a bit at a time. Then they fill the details later. This is similar to my above comment, but works quite differently. For example, they explain web descriptors starting out with simple xml files to name servlets according to the class, url and servlet name. The explanation and how this maps in real life web applications is so concise it took less than two pages to understand (and I keep even today hundred of pages explaining all that crap and I still do not get it… the comparison is like some cryptic language versus plain old English.)
Third, finally someone explains the directory structure beforehand examples! It is so darn easy to understand the whole schema when you know what goes exactly where. This is important if you look at the Rails directory structure where you know exactly what goes where. For example, controllers go inside app/controllers; images go in public/images; etc.
Building in spiral is a great way to get a concept across, and I can not think of a better subject than Java Servlets and JSP to be explained gradually and slowly (no wonder most major web projects I know are done in PHP, Perl, or .NET, when not in Rails or Django)
I am not interested in passing any certification exam, but I certainly would recommend this book as if you could only get one book on Java web programming, get Head First Servlets and JSP.
Blogs are evil… specially if you are a designer. You are supposed to do something beautiful. Something that takes your breath away. Something so spectacular people will entrust you with their designs and web pages right away. And so you try time and time again every Wordpress and Movable Type theme available, and even spend time building your own. Yet something is lost in the process. You are so tied up building the blog, time passes by and no time is spent coding great web apps or building better websites for customers.
I believe myself to be a perfectionist, and as one, I am never happy with my designs. I spent far too much time lately getting the perfect creation and too little writting. And the truth is I love to write code and articles much more than building exuberant blog themes.
That’s why today I take a step back and implemented someone elses great design template. With luck, we will be making great articles shorthly.
Blog zen as far as I can see…