Archive for the 'Software' Category
Posted by stephan on 6. April 2008
It’s time for a new Ruby (and Rails) meeting in Munich. We’ll meet on Wednesday 9th of April starting at 19:00 (CEST) in the Pizzeria Michelangelo.
If youre’ coming, please answer via e-mail or comment by Tuesday (08.04.200
12:00 CEST (in order to make a reservation for enough tables).
Possible topics are: A short report from Euruko2008 which happened in Prague in late March, actually any other Ruby related topics.
Posted in Ruby | Tagged: Meeting, Munich, Ruby | 2 Comments »
Posted by stephan on 8. March 2008
Euruko 2008 is in Prague this year. Here’s the Euruko 2008 website where you can register, submit a proposal for a talk etc. Matz will be there. And of course a few other guys. Including me ;-)
Posted in EURUKO, Ruby | No Comments »
Posted by stephan on 1. November 2007
The (at the time of this writing) new Mac OS X 10.5 Leopard is now installed on my MacBook for a week. Time enough to find the way through a few of the new features. Time Machine is of course an easy way for backing up the system.
Anyway, to me Spaces (virtual desktops) are a lot more important, since I missed this feature before. Of course there was VirtueDesktops (which even featured desktop switching via the motion sensors). However with Spaces you can assign an application to a certain Space.
Terminal now comes with tabs instead of many windows, which also helps keeping the desktops clean. And last but not least Mac OS X now also includes Subversion, Ruby and of course Ruby on Rails, including – but not limited to – gems and Rake.
Only issue: The background image of the login screen needs to be replaced. In case you also like another picture, LoginWindow Manager might be useful for you.
Posted in Ruby | Tagged: Leopard, Mac OS X, Ruby | No Comments »
Posted by stephan on 15. October 2007
Wow, there are already 46 registrations for the European Ruby Conference, and 9 people who “might come”. That’s great, as we were already at the capacity for the room with that number last year. Obviously Ruby gained quite a bit of interest within the last year. Apparently it was a Good Thing to have a larger room this year: The room can take 100 people “easily” and 170 “squeezed in” (hope I got the translation right).
Currently there are already 19 people willing to give at least one talk, some even offered giving two. So there’s no problem filing to full days with interesting stuff about what’s going on in the Ruby world. I really looking forward to this, especially the Koichi’s talk about YARV and Ruby 1.9.1. How exciting is that? And then there’s something about Ragel, a state machine compiler. And, doing test automation myself, of course I’m interested in the talks about automation. These are going to be exciting days.
All that for a conference fee of just about 20 Euro.
Posted in EURUKO, Ruby | No Comments »
Posted by stephan on 16. September 2007
One of the sightseeing program was ‘cute Knut’ the young polar bear in the Berlin Zoo. And then today will also see ‘Bratwurst on Rails’. Meanwhile there’s still lunch, a boat trip and some more preparation for my RejectConf talk.So much to do and see — but so little time…
See you at the Bratwurst event.
PS: I remember an e-mail with proposed tag to use for blogging about RailsConf Europe — but can’t remember what exactly some suggestions where… Can someone please give a hint?
Posted in Berlin, RailsConfEurope, RailsConfEurope07, Ruby on Rails | 1 Comment »
Posted by stephan on 16. September 2007
A great city. Huge in fact. And the hotel is great too: Located in the centre of the city, just a few minutes walk away from the Kalkscheune, the location of Bratwurst on Rails (which unfortunately seem to be down at the time of this writing [2007-09-16T09:48:37+02:00]. And the RailsConf Europe 2007 hotel is just a little bit further down the street close to the train station Friedrichstraße. Another plus for the hotel: Wireless network is free.
Hmm, I received a letter from the RailsConf organisers with a suggestion of what tags to use, if only I printed that out at home.
Posted in Berlin, RailsConfEurope, RailsConfEurope07, Ruby on Rails | 1 Comment »
Posted by stephan on 11. September 2007
After a few weeks of struggling to find a location we finally found a place. In fact we also found a new date:
Euruko 2007 will be located in Vienna, Austria on Saturday & Sunday 10th and 11th November 2007.
This was also announced on ruby-talk as well as the Euruko wiki … and a few other places.
If you’re planning to attend or to give a presentation, please use the wiki to register.
Posted in EURUKO, Ruby | 4 Comments »
Posted by stephan on 2. July 2007
We’ve now set up a Basecamp. Contact me with any requests for a login, if you’re interested to help getting the conference organised.
And if you couldn’t remember a single additional login, why not letting us know by commenting here or sending me an e-mail? May be you have an idea about a talk you’d like to hear or, dare I mention it, a presentation you’d like to give.
The EURUKO is not a commercial conference, it’s meant to follow the Open Source spirit: If you like to contribute - well - do it.
Posted in EURUKO, Ruby | 5 Comments »
Posted by stephan on 25. June 2007
Summary form the EURUKO 2007 planning meeting:
- Location: Very very likely to be Munich, Germany
- Date: Very likely to be the 10./11. or 17./18. November 2007
- Improved organisation compared to last year.
- Ideas for keynotes, precise location and more.
Stay tuned for more later.
Posted in EURUKO, Ruby | No Comments »
Posted by stephan on 19. June 2007
I’m trying to get the EURUKO 2007 planned. What do you think about having another European Ruby Conference?
If you like to have one: Where should that be? Up to last year it always was in Germany, most of the times in Munich. How about another place?
Where to get a conference room in that other possible place?
At a low const preferably, since the EUROKO has always been a organised by volunteers — in the past few year the conference fee was about 20 Euro.
Would you like to attend, give a presentation, help getting it organised, provide a conference room, beverages or food?
Literally everything is still open — even if there’s going to be a EURUKO 2007 at all.
Please let me know what you think. Just comment here or send me an e-mail.
There will be a 1st meeting about this year’s EUROKO on Monday the 25th of June 2007 in Munich, Germany.
If you like to attend just drop me an e-mail to phvalue — yup, that’s singular — at mac dot com.
Posted in EURUKO, Ruby | 2 Comments »
Posted by stephan on 1. May 2007
Well, I did it myself: Learning Ruby on a Windows machine. However not with such a huge number of books, on-line tutorials and what-not. In fact I learned most of it with The Pickaxe Book (1st edition, though).
However I just now ran into something new: Hackety Hack. Created by the creator of Why’s poignant Guide To Ruby — whytheluckystiff.
I even installed it on my Mac, well the thing is running in Parallels. Because Hackety Hack comes as a Windows installer. Which is why I called this ‘Learning Ruby on Windows’.
Posted in Programming, Ruby | 1 Comment »
Posted by stephan on 29. April 2007
To stay organised with all that stuff I write with TextMate, I use a few Textmate projects — for some general stuff, all kinds of smaller and larger Ruby code and, of course some Ruby on Rails.
And to stay organised with these project files which are spread the same way as the project directories are — I use the TextMateProject widget which is available form Mac OS X Nusings. This was created and improved by Eric and Anthony.
While most of these project files in fact live somewhere inside my home directory and are searched for and found by the widget, others are located on my iDisk and are not found (and consequently as software is they aren’t listed either). As the widget doesn’t even search on that iDisk, that’s not so too surprising.
Please note: The following involves editing files in the Library folder in your home directory which might break something on your computer. So as with all software and code lines made available like this: I make no warranties, express or implied, including without limitation the implied warranties of non-infringement, merchantability and fitness for a particular purpose in any way.
In other words: As you’re reading this, I suppose you are a software professional of some kind and you know what you do to your comuter. You act responsibly — and backup your computer regularly anyway, but certainly before you apply anything coming from the net. But in case you’re not familiar with writing or changing code, this is probably not for you.
But now, without further ado, I went into my 1st bit of JavaScript programming, to add listing of the project files on the iDisk to the projects widget. So if you’d like to do the same — here is what I did:
Download and install the TextMate Projects widget from the location given above. Now the widget should be located in this directory: /Users//Library/Widgets/TextMate Projects.wdgt. With a CTRL click your can open the contextual menu and then select “Show Package Contents”. In that directory there is a directory Scripts and inside that you should find Scroller.js. That’s what I edited:
Open that file in you favourite editor TextMate and got to ~ line 115. The 1st line is there already — I added the 2nd one:
projects = (widget.system('mdfind -onlyin ~ "kMDItemKind == 'TextMate project'"',
null).outputString).split("n");
projects = projects.concat( (widget.system('mdfind -onlyin /Volumes/iDisk
"kMDItemKind == 'TextMate project'"', null).outputString).split("n"));
Save this file and you’re done.
Is there a more ‘javascriptesque’ way to do this?
Is there something like += for Arrays in JavaScript?
Posted in Software, support | No Comments »
Posted by stephan on 25. April 2007
While reading the Textmate book I stumbled upon a command line tool, I didn’t knew about: erb.
Yes, that’s just as in ERb — embedded Ruby. The tool itself, as well as its help, is at your finger tips and should come with your standard Ruby installation:
[2] stephan@rubin ~ #erb --help
print this helperb [switches] [inputfile]
-x print ruby script
-n print ruby script with line number
-v enable verbose mode
-d set $DEBUG to true
-r [library] load a library
-K [kcode] specify KANJI code-set
-S [safe_level] set $SAFE (0..4)
-T [trim_mode] specify trim_mode (0..2, -)
-P ignore lines which start with "%"
What is it good for? Any kind of text generation, whenever there’s some text you need often, but would like to have ‘preprocessed’.
Let’s assume you’de like to embed the current date at the beginning and any fortune output at the end of your new e-mails. This could be your template file, let’s call it mail_template:
<%= Time.now.strftime( '%A %d %B in the year %Y')%>
<%= %w( Dear Hi Hello ).sort_by{ rand }.first %> <name_here>,
...
Best wishes
<%= ENV[ 'USER' ].capitalize %>
--<%= `fortune` %>
Obviously this needs fortune to be installed on your computer. Run this though erb:
erb mail_template
This is an example of the output:
Wednesday 25 April in the year 2007.
Dear <name_here>,
...
Best wishes
Stephan
--Suddenly, Professor Liebowitz realizes he has come
to the seminar without his duck ...
Replace the place holders and add your message. However, beware of the fact that sometimes fortune will leave you with quite a few lines of text.
Posted in Ruby, erb | No Comments »
Posted by stephan on 11. February 2007
Another response to Mike’s post:
stephan@laotse ~ # gem list|grep '^[a-zA-Z]'
actionmailer (1.3.2, 1.3.1, 1.2.5)
actionpack (1.13.2, 1.13.1, 1.12.5)
actionwebservice (1.2.2, 1.2.1, 1.1.6)
activerecord (1.15.2, 1.15.1, 1.14.4)
activesupport (1.4.1, 1.4.0, 1.3.1)
cgi_multipart_eof_fix (2.1, 2.0.2)
daemons (1.0.4, 1.0.3)
fastthread (0.6.3, 0.6.2)
gem_plugin (0.2.2, 0.2.1)
hoe (1.1.7)
log4r (1.0.5)
mongrel (1.0.1, 1.0, 0.3.13.4)
rails (1.2.2, 1.2.1, 1.1.6)
rake (0.7.1)
RedCloth (3.0.4)
rmagick (1.15.2)
rubyforge (0.4.0)
rubygems-update (0.9.2)
rubyzip (0.9.1)
soap4r (1.5.5.20061022)
sources (0.0.1)
sqlite3-ruby (1.2.1, 1.2.0, 1.1.0.1)
syntax (1.0.0)
Posted in Ruby | No Comments »
Posted by stephan on 28. January 2007
Sometimes I like to find out in which method my programs are currently in — may be for debugging but a lot more likely to log that fact for later analysis. For some (long running) automation stuff that’s really useful. Especially if (or when) the exact order of method calls it not deterministic. Think for example of a rules based engine which randomly applies a set of rules to a set of objects.
That said, you could just make each method log it:
def method_1
logger.info "Executing #{ method_1 }"
# more code
end
But that’s not DRY after the second method doing that. And it’s manual, cumbersome and error-prone.
Well, there’s Kernel#caller, but I was looking for something a bit more compact. So here it comes:
module MethodCallList
def method_name
list = caller[ 0..-2 ]
if list.empty?
"method_name"
else
list.map do | el |
if md = el.match( /in '(.+)'/ )
md[ 1 ]
else
''
end
end.reverse.join( '/' )
end
end
end
Is there any better, more elegant or completely different way to do this in Ruby? I’d love to hear about that.
Hmm, the module name could be better than this…
Posted in Ruby, method call, syntax | 1 Comment »
Posted by stephan on 19. January 2007
I really value good documentation for current versions of software, so I am pleased to see that Rob Orsini’s Rails Cookbook is published quite in time with the release of Rails 1.2 which has been released in the past few days.
This completes the documentation of both Ruby itself and Ruby on Rails even further.
Posted in Programming, Rails Cookbook, Ruby, Ruby on Rails, Technical book | No Comments »