Archive for the 'Programming' Category

SEO Black Hats Find Major Exploit in Moveable Type

From a Digg post:

“SEO Black Hats have found a major loophole in the comment preview of the Moveable Type blogging platform. This exploit let’s them insert active links into any post, avoiding the “nofollow” penalty usually associated. This allows them to artificially inflate the importance of spam websites, leading to less accurate search engine results!”

This is really too bad, seeing as their are hundreds, if not thousands, of high-ranking blogs out there based on the Moveable Type platform…

read more | digg story

Ruby, Rails and RJS

So, today I learned about RJS for Rails… RJS, or Remote Javascript, is a method which allows you to write complex AJAX scripts using Ruby syntax etc. Using RJS templates, it is possible to create extensive effects.

Now Rails has for a long time naturally includes some built-in functionality for AJAX, via the PrototypeHelper and ScriptaculousHelper libraries. Unfortunately, these two helpers would only allow one element in the DOM to be updated in an AJAX operation. That did not suit for what I wanted to do. Luckily, since Rails 1.0, RJS has been including. In addition to providing a simpler way to write AJAX functionality into your project, it also allows you to modify as many parts of the DOM as you wish per AJAX operation.

Of course, there doesn’t seem to be any good tutorials concerning RJS on the Internet. After looking for a while, RyanB from the Rails Forum suggested purchasing RJS Templates for Rails from O’Reilly. This is a great book - it comes as a PDF, and is only 60 pages or so, but is jam-packed with information on RJS, with code examples, and everything.

Because of this, I have been able to start implementing some AJAX functionality on a project for my employer. The visual effects from script.aculo.us are pretty cool, but the real benefits come from the increase of useability for the end-user. No longer does a user have to wait for page reloads etc. everytime he changes a vaue on the page. Plus, it is simple to link the AJAX pieces into your database, yielding an extremely ‘live’ page.
So, the moral of the story is, if you utilize Rails together with AJAX in any way, look into RJS - it can and will save you tons of time and energy, while vastly improcing your site design and useability!

Answers from the Great Programmers

I was just recently reading an article on the Sztywny Blog where the author sent a number a questions to a variety of today’s famous and great programmers. While he did not get replies from all the people he asked, he did get responses from

  • Linus Torvalds - Linux Kernel
  • Dave Thomas - Author of Pragmattic Programming, other great books
  • David Heinemeier Hansson - creator of Rails
  • Steve Yegge - Author of Wyvern, has a great programming blog
  • Peter Norvig - Research Director at Google
  • Guido Van Rossum - Creator of Python
  • James Gosling - Java language creator
  • Tim Bray - author of the Atom and XML specifications, as well as a blogger.

Many questions are asked, including where these guys learned programming, important skills, the value of math and physics with regards to programming, the future of programming, their favourite technology, their favourite tools, books and much more - a great read!

One thing that does come across while reading the article is that David Heinemeier Hansson is a very different breed of programmer from the rest of the people interviewed. At least, it seems to me that his answers stand out from the rest. He seems to be less of an academic, as a practicing programmer. That may not be the most accurate way to state the difference, but it is the best I can do.

Regardless, these are some of the top minds in the business, and there is a lot of interesting points they make. Very good reading for any programmer or Computer Science student. If nothing else, read the section where they describe their favourite tools - You may find a better environment than what you currently use!

MVC: Why Everybody Should Code with Rails at Least Once

First, before you read this article, I would suggest you read my first post on the subject, and this article.

So now you know what MVC is. You know why it is important when designing web apps, and why is is considered essential in Rails coding.

Rails disciplines you into using MVC. I have been programming with Rails for about 2 weeks. Through the process, and being forced into using MVC, I have also begun to think in MVC terms. In fact, the Model-View-Controller design pattern has become almost second nature to me. I can’t think of a clearer way to design a web application.

This is amazing to me, because I used to be, and in many ways still am, a sloppy programmer. I ran by the seat of my pants, without much over-arching architecture, and little true design. My code always worked, and well too, but was a nightmare of a tangle to read and maintain. I am amazed at the clarity and simplicity that is presented when using Ruby on Rails. I can actually make sensible UML diagrams of my work, without it looking like Medusa’s hair.

That is why I would push for every programmer to build at least one project in Ruby on Rails. Not only will you find that your coding time is cut down, due to the quick nature of Ruby on Rails, but you will also be forced into using good style. Well, maybe not, but you will be forced into using design patterns. That is a great advantage in the long run.

Applications are Built by Good Developers, Not Technologies

I’m taking on a bit more of Chris Shiflett’s post Ruby on Rails Fans. Following a list of the best Web 2.0 applications (Digg, del.icio.us, Wikipedia etc.), he tells how these kick-ass sites are written in PHP. He then reviews the best Ruby applications. Following this he writes:

I think a larger point is that good applications are built by good developers, not technologies. Did you know what all of these applications were written in? Did you care? Be honest.”

Oh, I know, I know. The point is quite obvious. But it is a good reminder. A good programmer doesn’t necessarily need the best language. If he/she is a good programmer, they can make the best of whatever language they want. To get right down to it, you should somehow be able to create any type of site that currently exists, using any Turing-complete language. It may take more, or less work in some. Creating a web application would be a lot more work in assembly, than Ruby on Rails, for an extreme example. But language choice should not be blamed for the failure of a project, if the choice was reasonable to begin with. That is more of a fault on the part of the programmer.

Ruby on Rails is a Niche Technology!

Here is a little piece written by Chris Shiflett in his Ruby on Rails Fans post:

“Ruby on Rails is a niche technology, and although all signs indicate that its popularity is growing rapidly, it’s a bit premature to be thinking that it will dethrone existing technologies.”

Alex Bunardzic writes in a recent post concerning this:

“The problem with the above statement is that it assumes that there are technologies which are not niche. But there really aren’t.

Even far-reaching technologies, such as web, are niche. Each technology has its niche, and there is no such thing as a general purpose technology.”

Alex, I have to disagree with you, somewhat. Your idea that every technology is a niche is somewhat flawed. Taking the word niche to it’s straightest definition:

Niche (noun): A niche is a special place within the scheme of things. It sometimes denotes the function or position of a thing within a structure.

Now, if you take niche to mean as defined above, then you are completely correct. If we were to use only that interpretation of niche, then there is nothing that is not filling a niche. The world and society are somewhat well-organized. Everything has a purpose to fill, or else it wouldn’t exist.

Common usage of the word niche, however, indicates something different. For something to be ‘niche’ within a group of other items or subjects typically indicates that it has a higher level of specialization than the norm. Taking this definition, calling Ruby on Rails a niche technology, is somewhat valid, especially if compared to COBOL, or C/C++, Java, etc. Ruby on Rails is meant to tackle a single, major problem - that of quickly constructing a viable web-based application, providing frameworks to assist along the way.

Therefore, I think it is fair to argue that Ruby on Rails is a niche technology.

In another point, Bunardzic writes:

“But if we look around, we’ll see that no technology ever goes away. Even though we live in the age of supersonic traveling, there is still plenty of trains, even horse carriages going around. These technologies will never go away.

Same is with high-tech. Mainframes running COBOL programs are here to stay. They will never get replaced by Ruby on Rails based software.”

I also disagree. how many 8-tracks do you still see, used seriously? Sure, vinyl is around, but what about the phonograph, or wax cylinders recordings?

Yes, COBOL systems are still used in some businesses, but they are on their way out. In 10 years, they will be gone. It is only a matter of time until the migration process is cheaper than the cost of maintaining inefficient legacy code. And every technology reaches that point at some time, even if it is 10 or 15 years overdue.

I am sure that there will always be hobbyists who will use these technologies. But they will be completely supplanted in common use. It cannot happen any other way.

I am open to a response, guys!

IBM Notes to Run Natively on Linux

According to CIO, IBM is preparing to announce that their IBM Lotus Notes software will at long last be ported to Linux. This is an important move as businesses move more and more towards the Linux open source operating System. Previously, users who wished to use IBM Lotus Notes on Linux were required to do so through the use of web clients or emulation software.

According to Arthur Fontaine, Lotus Notes for Linux will be available for users to download as of July 24th, 2006. This will be the first piece of enterprise software offered on the Linux desktop by the blue giant.

In creating Lotus Notes on Linux, IBM has used the Eclipse Rich Client Platform, a component of the Eclipse Foundation. This is the same component that IBM is using extensively in ‘Hannover’, the next major Lotus notes release, due to be released sometime in 2008. Due to it’s Java backbone, Hannover will be able to run across Windows, Linux, Mac, and any other machine which supports a Java Virtual Machine.

« Previous Page — Next Page »