Simplificator_Logo

web applications


Determine Language of Text

July 14th, 2009

Wan’t to know what language a text is written in? Maybe a comment on your Blog, an e-Mail you received, let your CMS guess the language of an article? Enter the babel gem!

Babel uses a n-gram approach to build reference profiles for languages. It also builds a profile for the input text and then calculates the distance between each reference profile and the input profile. The closest profile is probably the one with the language of the input text. Proabably. Chances are that Babel gives you wrong results on short sentences or single words.  You want to know more? Here is a paper that describes and compares different approaches.

We’ve setup a demo app so you can try out babel. And of course you can get the gem from github.

When taxes become taxis

June 25th, 2009

Thanks to the neat Inflector if ActiveSupport we know that the plural of tax is taxes. But if you ask for the singular form of taxes the inflector will try to convince you that it’s taxis!

>> "tax".pluralize.singularize
=>"taxis"

The reason we even found out about this was, that our tests (you do write tests, do you?) blew up when we used the taxes() fixture with a FixtureClassNotFound error. Of course: we do not have a Taxis class.

So how do you fix this? Simple: Edit config/inflections and add your own rule:

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'tax', 'taxes'
end
>> "tax".pluralize.singularize
=> "tax"

Be sure to prefix Inflector with the ActiveSupport module. Otherwise you’ll face `load_missing_constant’:NameError: uninitialized constant Inflector

A good day

June 24th, 2009

Currently we are working in a refactoring project. It’s a big huge project communicating with legacy systems with lots of code.On really good days (that is: few concurrent users with a tendency to 0 …) the application was working as planned (well, almost). On any other day it was throwing exceptions and consuming memory like crazy, producing random results and was slower than  its predecessor.The last days we’ve been investigating the master data management part of the application and decided that is time to start an overall renovation. After all the rest of the business depends on that data and it controls a lot of business processes. Here roughly what we did to put things straight:

  1. Read the code to gather the requirements (no documentation on-hand)
  2. Wrote automated tests to assure functionality
  3. Refactored, fixed bugs
  4. Done

So what’s the point you ask? You always write tests? That’s the way it should be? Well in this environment automated tests are rather scarce and we are had a hard time to convince people that they are a great thing. We told stories about how tests improves quality of code, how they encourage coders to change and improve code, how they will bring peace to the world. But with this part of the application now working flawlessly and faster with less LOC than before, we see some more acceptance for “losing time writing tests”. A good day.

Look, no password!

June 24th, 2009

We’re using ssh with public keys quite often. One thing I always missed on OS X was the ssh-copy-id script. Its job is to take the public key of the user running the script and helping to copy that over to a server, so that the user doesn’t have to enter the password all the time. It’s a great time saver and allows you to secure the accounts with harder passwords (instead of using the same password for all accounts, like you do).

Github has a nice guide how you can create a public key, in case you don’t have one. Now, grab a copy of the ssh-copy-id script from the openssh package (for example from here). Copy it into /usr/local/bin and chmod it:

sudo cp ssh-copy-id.sh /usr/local/bin/ssh-copy-id
sudo chmod a+x /usr/local/bin/ssh-copy-id

Then you can use the following command (you’ll have to enter the password one last time)

ssh-copy-id user@machine.com

The thing tells you to check which keys you copied, so have a look at .ssh/authorized_keys after the act. Do that, it’s wise. And change your silly password into something more complicated.

By the way – we have a piece of software blocking all IPs which try to log in using passwords more than five times in a row. And it happens dozens of time a day.

1 Comment »

Tweettweet. Tiny update on Railsworld.com

June 22nd, 2009

Railsworld now tells the world about new rails sites through twitter.

New additions are tweeted when they are ranked the first time. We do not tweet changes to the ranks as this would be a bit noisy. Follow @railsworld if you are interested.

Railsworld is our demo application. We use it to show customers how rails development works.We will add more tiny features from time to time…

rwebthumb updated

June 16th, 2009

Thanks to Ryan there is an update to the rwebthumb gem. He removed the tzinfo dependency and fixed a bug. And by the way: github is just great for sharing, contributing and releasing code!.

Railsworld

May 6th, 2009

Railsworld Logo “Ruby on what?”

That was the usual answer when we talked to a potential customer about the technologies we planned to use.
Nobody knew what we’re talking about. Time works for us and now the question slowly gets replaced with “What other sites are built with Rails?”.

Well, we know a few. But we always seemed to forget one or two which could have been worth a mention.

Thats why we started railsworld.com (most of the code was written on the train… so it’s really “on rails”). It is simply a list of sites built with Rails. And we can use the source code to demonstrate the rails way of programming.

We hope that the list of rails sites will grow and that it helps others to promote the framework.
You have a rails site to add? The requirements are simple – it has to be public, built with rails – and we don’t want porn. Just add it and it will show up in the list after a while (right now a cron job runs from time to time to fetch alexa rankings and thumbnails … but we might look into DJ or the like to speed up the uptake).

Take a look. There’s a lot of interesting stuff there.

Pharma

May 4th, 2009

Structure of a DNA quadruplex (wikipedia)It had to happen. Being a Basel-Zurich enterprise, we already got our feet wet in Zurichs financial industry – now we are dipping our toes into pharma. We have a project for one of the two largest pharmaceutical companies of Basel.

That company is now using Rails. The demand for staffing this project didn’t come from its IT department but originated from a need within the company to get things solved efficiently and pragmatically, This is where Ruby on Rails came into the picture.

The assignment is to take on an internal project, push it forward, implementing features which users demand. We obviously hope to continue the relationship and help them solidify the use of modern tools for web development at the company. There are many aspects to figure out though – at the moment we are working on site due to security and confidentiality considerations. In order to use our team on the project in an agile manner, we would have to gear up with security here at Simplificator. And we would need to find proper processes to handle and scale with the demands of this company.

We look forward to the project.

new ruby gem: compete

May 4th, 2009

We’ve written up a tiny ruby gem for the compete api. It can be used to query the compete service for ranking and trust information about a domain. We’ll eventually integrate it into railsworld.com so we have another source for ranking information (right now it’s alexa).

 Find more at the github repo for the compete gem

2 Years Simplificator!

April 30th, 2009

2 Years Simplificator Whichever statistics you believe, the first two years seem to be quite tough. We made it and we’re very happy we did. We founded with the understanding that one can use good tools (Ruby on Rails) and good methods (Agility) to write good software. At the time, it was hard to defend both parts. Now not so much anymore.

So we are at least in some parts ahead of the curve. It’s a reason to celebrate, and to thank everyone who was involved in this great venture.

As much as we’re looking into the past, this is somehow just the beginning as well. It’s good to look to the future, and I’m happy we can do that.

Some invitation mails have got lost. If you didn’t get one and you’re reading our blog there must have gone something wrong – please join us between 17:00 – 20:00 in our office in Zurich to celebrate with us, if you have time.

1 Comment »

« Previous Entries
Next Entries »
  • Categories

    • Java
    • Jobs
    • Linux
    • News
    • Ruby
    • Tech
  • Blogroll

    • Agility In The Enterprise
    • Beech Bonanza
    • Coffee & Gems
    • downside.ch
    • Err the Blog – Home
    • FozWorks – Home
    • franck’s blog
    • InVisible Blog
    • Joel on Software
    • Kogler On Rails – Home
    • Loud Thinking
    • Micro Persuasion
    • Nuby on Rails
    • Paul Graham: Essays
    • Pinksemu News
    • RailsJitsu
    • Riding Rails – home
    • The Yellow Marker
    • viibee.com
    • Youtilize
    • zen habits

simplificator is proudly powered by WordPress
Entries (RSS) and Comments (RSS).