Approximity blog home
197 to 216 of 600 articles InfoSyndicate: full/short

Some good Haskell IRC quotes   16 Nov 05
[print link all ]
Enjoy

script/console -- the rails irb   14 Nov 05
[print link all ]
Few rails users know that script/console exists. It lets you interactively explore your rails application. It is quiet similar to irb.

It can help to avoid a lot of browser reloads and so ultimately speed up developmpent even further. It’s a great debugging tool, and it’s fun to play with your objects in real time. But even better; you can use it to get work done. You have full access to your models.

 >> u=User.find_by_username('m94asr')
 => #<User:0x23b34b0 @attributes={"username"=>"m94asr",
   "firstname"=>"Armin", "id"=>"1", "surname"=>"Roehrl", "password"=>"XX"}>

 #reload your code
 load 'sample.rb'
 sample.do_sth

Start the console with the console script:

 ruby script/console

If you start it without arguments the script will start the console in the development environment. To get to the production DB type

 ruby script/console production

MySQL new style password hashing   14 Nov 05
[print link all ]
If you are using rails with a newer mysql version you get an error message when trying to connect to mysql. database.yaml includes this link.

Basically you need to enter:

 mysql> SET PASSWORD FOR
     -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Code Snippets: ruby on rails   13 Nov 05
[print link all ]
Some useful Ruby on rails snippets.

Session Container Performance   13 Nov 05
[print link all ]
I came by accident across this interesting study by ScottBarron.

The Ruby on Rails application framework provides several options for storing session data. Each option has its advantages and disadvantages which may not be readily apparent. The tests outlined in this document attempt to lay some groundwork which should help when determining which storage container is most suitable for your application.

I highly recommend reading it!

Getting your RSS feed into google/ig   12 Nov 05
[print link all ]
I like Google’s new personalized startpage. Adding your own data feeds via RSS is very simple.

Simply click on the top-left on Add Content.

Then click on "Create a Section" and add the right feed. For this blog:

 http://www.approximity.com/cgi-bin/blogtariAgile/index.rb/synopsis.rss

and for Futurometer:

 http://www.futurometer.com:3001/rss.xml

Now it will show up. Thanks to Ajax you can move the sections around with the mouse. Enjoy it!

Stefan added the red markings used inkscape an open source scalable vector graphics editor.

Adium: instant messaging   12 Nov 05
[print link all ]
Adium is a free instant messaging application for Mac OS X that can connect to AIM, MSN, Jabber, Yahoo, and more

After some searching and experimentation I recommend Adium on os X. On Linux I prefer gaim. Adium uses libgaim.

Screenshots on OS X   12 Nov 05
[print link all ]
In a nutshell:
  • the entire screen: Command-Shift-3
  • region of the screen: Command-Shift-4; Then click and drag the cursor to mark the area you want to capture.

The files are normally saved as Picture-* on the Desktop.

Further reading: MacDevCenter about more fancy capturing using timers, etc.

Paul Graham: The Venture Capital Squeeze   10 Nov 05
[print link all ]
Once again a good read. Paul Graham mentions Rails as an example of being 10 times more productive and not having to outsource :-).

In the next few years, venture capital funds will find themselves squeezed from four directions. They’re already stuck with a seller’s market, because of the huge amounts they raised at the end of the Bubble and still haven’t invested. This by itself is not the end of the world. In fact, it’s just a more extreme version of the norm in the VC business: too much money chasing too few deals.

Unfortunately, those few deals now want less and less money, because it’s getting so cheap to start a startup. The four causes: open source, which makes software free; Moore’s law, which makes hardware geometrically closer to free; the Web, which makes promotion free if you’re good; and better languages, which make development a lot cheaper.

Seth Godin: Understanding Local Max   10 Nov 05
[print link all ]
Set Godin has an interesting blog entry explaining that one has to give up a local max one has reached in his career to reach even higher goals, even though at first one is losing ground.

To get from the local max to the big max one has to have the guts to go through the pain of point C.

GoboLinux   09 Nov 05
[print link all ]

GoboLinux is an alternative Linux distribution which redefines the entire filesystem hierarchy.

GoboLinux is a Linux distribution that breaks with the historical Unix directory hierarchy. Basically, this means that there are no directories such as /usr and /etc. The main idea of the alternative hierarchy is to store all files belonging to an application in its own separate subtree; therefore we have directories such as /Programs/GCC/2.95.3/lib.

To allow the system to find these files, they are logically grouped in directories such as /System/Links/Executables, which, you guessed it, contains symbolic links to all executable files inside the Programs hierarchy.

To maintain backwards compatibility with traditional Unix/Linux apps, there are symbolic links that mimic the Unix tree, such as "/usr/bin -> /System/Links/Executables", and "/sbin -> /System/Links/Executables" (this example shows that arbitrary differentiations between files of the same category were also removed).

No smoking please!   08 Nov 05
[print link all ]
Smoking people in restaurants can really be annoying. Europe still has a long way to go till its people nolonger kill each others with the smoke.

They smoke and nobody cares whether an allergic or asthmatic person is near. They do not even have mercy to their own babies!

Berlin was a good surprise sofar. Some of the biggest restaurants offer non smoking areas. Today at the Reichstag they had these nice logos plastered on the way to roof.

Does that sound familiar?   04 Nov 05
[print link all ]
George who?
 Road Engine

 Patent No. 549,160

 Inventor: George Selden, Rochester, New York

 Issued: November 5, 1895

This patent represents a forgotten episode in the history of the automobile. The question of who invented the motor car is an open one - Ford, Daimler, Duryea, Cugnot all lay claim to the title of "Father of the Automobile" - but you will seldom hear the name of patent attorney George Selden of Rochester, New York, mentioned.

Selden squeezed the fledgling industry for royalties on every car produced until he was stopped. Who stopped him? Henry Ford. How? A court patent fight that made newspaper headlines nationwide. The outcome hinged on a curious court interpretation. The result was the greatest boon to industrial production the world had ever seen — the US automobile industry.

Note: This patent has a witnessing signature by George Eastman of Eastman Kodak.

Full story

Futurometer - version 0   03 Nov 05
[print link all ]

Predicting the future!

After a long night of coding we are proud to announce Futurometer version 0. Now you can select for which keyword you want to see the plot.

To the birdflu page we added H5N1.

Stay tuned, more to come soon.

Four Days on Rails   02 Nov 05
[print link all ]
Four Days on Rails is a nice tutorial of about 45 pages. It goes beyond the usual show off of a simple "scaffold" application with virtual no coding.

[ANN] Rails Engines + Login Engine   02 Nov 05
[print link all ]
James Adam posted this to the rails-ML.

Announcing the birth of a bouncing plugin baby boy:

rails-engines.rubyforge.org/

… at which you can digest all manner of propaganda and rdoc.… well, docs. You might particularly want to watch the demo movie:

rails-engines.rubyforge.org/movies/engines_intro.mov

Any mirrors of this would be greatly appreciated! Below is the hype:

What are Rails Engines? Rails Engines are a way of dropping in whole chunks of functionality into your existing application without affecting any of your existing code. The could also be described as mini-applications, or vertical application slices - top-to-bottom units which provide full MVC coverage for a certain, specific application function.

Why do I want this? Rails Engines are advantageous over normal generators because the do not insert any code into the /app directory, but remain isolated within the plugins directory of your application. Furthermore, you can override individual controller actions and views/partials within your application as needed, whilst leaving the original Engine files intact.

OK, I need an example As an example, the Login Engine (heavily based on the Salted Login Generator, all kudos to those guys) provides a full user login subsystem, including:

  • controllers to manage user accounts;
  • helpers for you to interact with account information from other

parts of your application;

  • the model objects and schemas to create the required tables;
  • stylesheets and javascript files to enhance the views;
  • and any other library files required.

How do I get such devilry? Engines can be distributed using the same mechanisms as regular Rails lugins (since to the Rails plugin system they appear to be almost the same thing). If you are developing engines yourself for use across multiple projects, linking them as svn externals allows seamless pdating of bugfixes across multiple applications.

The Rails Engines plugin and all other engines should be listed on the Plugins page in the wiki, so that the bleeding-edge script/plugin command can be used to install them painlessly.

Currently they are hosted on the OpenSVN servers at opensvn.csie.org/rails_engines/plugins, although a more permanent home would be make me very very happy.… </beg>

wiki.rubyonrails.com/rails/pages/Plugins

Rico   01 Nov 05
[print link all ]
Rico is an open-source Javascript library for creating rich internet apps.

AJAX SUPPORT

Ajax is the term that describes a set of web development techniques for creating interactive web applications. One of the key ingredients is the JavaScript object XmlHttpRequest. Rico provides a very simple interface for registering Ajax request handlers as well as HTML elements or JavaScript objects as Ajax response objects. Multiple elements and/or objects may be updated as the result of one Ajax request. DRAG AND DROP

Desktop applications have long used drag and drop in their interfaces to simplify user interaction. Rico provides one of the simplest interfaces for enabling your web application to support drag and drop. Just register any HTML element or JavaScript object as a draggable and any other HTML element or JavaScript object as a drop zone and Rico handles the rest. CINEMATIC EFFECTS

When actions are no longer occurring just at the page level but within the page itself, more clues are required to clue the user on what has transpired. Cinematic effects such as scaling and smooth sliding transitions can communicate change in richer ways than traditional web applications have explored before. Rico provides several cinematic effects as well as some simple visual style effects in a very simple interface.

BEHAVIORS

Take some raw HTML and sprinkle in some behaviors and what do you get? Well in Rico you can get an Accordion component like those found in Macromedia Flex and Laszlo. Just nest some DIVs and with one line of JavaScript turn your div panels into an accordion. And the latest behavior is the LiveGrid. LiveGrid allows you to connect an Html table up to a stream of Ajax responses. Ajax requests are automatically called during table scrolling. The result is now Html tables can hold an unlimited amount of data scrolled into view on the fly as needed! More behaviors are planned!

Ruby Weekly News   01 Nov 05
[print link all ]
Link

I especially liked the quote of the week:

 |> Hmm, how many of you have had Matz in your car? :D
 |> Myself, Eric, some others...

 |Does a rental count?

 Where was rental Matz available?  I'd like one.

                                                         matz.

How to use Ruby's Rinda::Ring   31 Oct 05
[print link all ]
Very nice tutorial by Eric Hodel about using Ruby’s Rinda::Ring :-).

Euruko 05 videos   31 Oct 05
[print link all ]
     Euruko Video Productions

     proudly present

     the European blockbuster

     of this year's

     Halloween night:

     http://futurometer.com/320x240x15fps/

link

 

Powered by Rublog