So for the past couple of years I have been using wordpress to host my blog. And while it is a very advanced, very mature and very flexible system, it takes too much upkeep to keep it up to date. And I found myself spending more time on the admin of word press than actually using it to write blog posts and what not.
So I have switched to using Tumblr as my blog host. I figured everything on this blog is public anyway, so it doesn’t matter that it is in public space. And I have also (I hope) migrated all my comments to use disqus. I used this ruby script wp2tumblr, that I found in this blog post http://mwunsch.tumblr.com/post/454540000/wp2tumblr-wordpress-to-tumblr-import-script to do the import. I modified it so that it would output a log file that I could import into discus and it would switch all the comments to the correct posts.
Here is my modified script wp2tumblr
Feel free to download and modify it to suit your needs
Filed under blog tumblr ruby
So I haven’t written a post in a while, but doesn’t mean that I have not been rubying in this time. Far from it, I have some irons in some fires and the latest fire is one that I got going using Padrino, and about 4 hours of time.
I basically do not watch broadcast TV at all. Bar the world cup, and other such good footballing things like that. So what I tend to do instead is download just the programmes that I want to watch from any country that broadcasts the show. But I have found it hard to find a service that would keep me informed about the shows that I am interested in, and tell me when a new episode is available.
Come in mytvrss.com great little web app, but doesn’t have info on all the shows that I watch, and they seem slow to respond to requests to add new shows. Then there is tvrage.com (which mytvrss use to get there information by the way), full of more tv information than any one person would require in a life time, but the site is just hard to navigate in my opinion. So I wrote an app that would take the xml feeds from tvrage.com and have them in a way that was much more manageable. At least for me anyway.
You can read more about it here http://github.com/philly-mac/tvrss, seeing as it is free for anyone to use and install locally or on a server. It is not the finished product yet, but it is very usable already, and that with just a few hours of time and ruby.
Filed under Ruby padrino rss tv
For the past month or so I haven’t been doing any coding at home because I did not have a internet connection. But now I have a connection again, so I am back on the coding band wagon.
And with that has come a slight change in the testing tools I am using. I have decided that cucumber, while great, adds a layer of complexity that is not needed when not working with non developers.
So I have gone with Bacon, Capybara + Rack-test. There are a couple more things, like the machinist for factories, but basically that is it.
I find this set up very simple and complete to work with, and without the extra feature files that I was having to write with cucumber, it means that it is likely to that I will code more.
As a side note, I know there is this new testing tool called steak that does sort of the same thing that I have set up here. But it uses rspec, and while I like the idea of rspec, I do not like all the black magic they use to get it to work. So no steak for me.
I prefer chicken anyway!
Filed under Ruby bacon capybara padrino rack-test steak testing
So last week I declared the next year, my year of the ruby, and I haven’t been sitting on my haunches either. I went head first into the murky world of rails 3 beta 1 with all the intentions of using it exclusively from now on for development. But things change, and I have to change with them. I am like a liquid, I adapt to any situation (or container) I am in.
So after a week of trying to get rails 3 to do the simplest things, which is install with datamapper, cucumber, testunit, and the devise plugin for authentication and authorization, I have gone back to using sinatra. And here is why. I spent a week trying to get all of these seperate components to work together nicely, I even wrote 3 patches for the devise plugin for datamapper which made it into the master branch. But in the end last week has not been as productive as I would have liked it. Almost 100% of my time has been used to track down bugs, writing fixes, and trying to see which combination of rails 3 beta, datamapper, and devise versions work together, all that with a side order of cucumber. So while I have done a lot of work this week, I haven’t really moved forward. And being stuck in the same place I was in last week is a very frustrating situation.
So, as I am a very adaptable person, and I want, nay, need to see progress in the things that I doing, I decided to go back to using sinatra for development for now, and work on the small apps that I am developing, which can then be used as rack middleware apps in rails 3 when it is finished, and doesn’t have so many version compatibility issues with other plugins, or vice versa.
In fact I am using something I discovered yesterday called padrino. Which I would describe as, a framework that sits on top of sinatra, but gives you a good starting base and a rails like structure, but with the stability of sinatra.
I also discovered minitest yesterday. Minitest is the replacement for testunit in ruby 1.9.1, so even though you use testunit in 1.9.1, what you are actually using is minitest with a testunit wrapper. Now, minitest is great, once you get to know how to use it. But therein lies the problem. While the actual tool is great, the documentation, examples etc is extremely poor. I basically had to do a little trial and error to get things going with it. This frustrates me, and I would rather spend my time using a tool than trying many ways to find out how to use it properly (hence me holding off on rails 3 for the time being).
But anyway, I feel this will be a more productive week. Just in 2 hours yesterday, I was able to get 70% of the way with sinatra/padrino as I did in a week with rails 3 beta. Now, that is not a slight on rails 3, it just means that it was a bold move on my part, (one that did not pay off) to try and use rails 3 in its beta state, and expect everything to work with it smoothly, or with much less fighting with the code than I did.
So onwards and upwards to week 2. I am expecting big things from this week.
Filed under Ruby minitest padrino rails 3 beta rails 3 beta 1 sinatra testunit
1st March, 2010, Hamburg, Germany.
So, I have decided to take upon myself a year of bettering myself somehow with regards to ruby and rails. So each day of the week, until 28th February 2011, I will spend at least 1 hour (or at least that is the plan) to do something. Whether that be to code something, read up on something, fix some sort of bug, blog about something, anything that means that I am improving/learning/contributing in someway.
So to that end I actually started two days ago. I ported my (what was) sinatra app to rails 3, changed to using devise as a authentication/authorization gem (although cancan seems to me to be better at authorization so I will be using that if I can), decided that I would test using testunit/matchy/rr/shoulda, then I started using the better_logging plugin for rails, which breaks on rails 3, so I fixed it here and sent a pull request on github. All in all a pretty productive weekend.
But I have a feast of things that I working on at the moment. Let me see if I can give a quick run down on what will be keeping me busy.
- I forked the mailr webmail client so that I can rails 3 it and make it look nice and continue to improve it
- I have decided to use vim as a my text editor/ide of choice, so I will be writing some scripts for it in ruby, to make day to day things easier to do, all my vim file are here
- Along with the mailr project I will also be creating a more flexible contacts app for it
- Also I will be finishing my small but extremely long running (in development terms) self productivity app.
- Ahhh, and not to forget my rails blog posts that I have not gotten around to writing yet.
Anyway, that is at least a few things that will keep me occupied, focused and improving over the next few months. I am always having new ideas, and I already have an ideas backlog to work through that I haven’t detailed in this post. So I am in no doubt that I will have a host of things to do this year. And you never know, I may even finish something this year. Now that would be good.
You can follow my public exploits here on github, and I guess you can read here about my not so public ones. But for minor updates I think I will just use twitter.
Filed under Ruby improving projects rails 3 year
I am going to be merging my philly_mac/señor internacional blog with this one, and just make use of categories. Easier for me to manage, and I am all about making my life easier.
Filed under General merge philly mac señor internacional
So after 1 year and 3 months I have decided that I will be making a move from my current company of Mirai España, in Madrid to Xing in Hamburg.
I have previously lived in Berlin for a year, so know what the German lifestyle is like. But even though I am very much looking forward to the move, there are some things that I will miss in Madrid. The Spanish, the weather and the Football. The football I may be able to find to play in Hamburg as well (I hope so because in Madrid it is quite literally excellent for playing football), But the Spanish and the weather are things I am going to have to adapt to not being the same as here.
But it gives me a chance to work for another great company and become tri-lingual in the process.
Of course I will still be a ruby/rails developer.
Filed under General mirai xing
Okay I have just realised something, I can just test use bacon along with rack-test to test rails applications using bacon. So scrap what I said yesterday. Now we will go with this
I think it is a good idea to write tests at the rack level. It means that your tests, and your testing skills are transferable to any rack supporting framework.
So I will give this stack a try, if it doesn’t work out I will go back to the stack I said yesterday.
Filed under Ruby
So, I just watched the latest screen cast from Ryan Bates of railscasts.com fame, on a plugin that he has written called canan. It is an authorization plugin and he wrote it in response to a plugin that he had previously reviewed called declarative authorization, which he thought (and I agree) is too heavy weight for most sites that require authorization.
Currently we are using declarative authorization in my place of work, but cancan is much easier to use and much more how I expected declarative authorization to work. So maybe with a little slight of hand I will be able to convince a couple of people to swap it out. It should be an easy and straight swap. If you haven’t watched the screen cast yet, do it. I think you will find that it is an elegant and very flexible solution for most authorization needs.
Wow, two blog posts from me in two days. It really must be Christmas.
Filed under Ruby authorization cancan plugin rails
Okay I have decided that I will test out using this testing stack on everything that I work on, so that I can become really excellent with this combination.
The stack is
And that is it, hopefully these should keep the tests clean, manageable and easy to read.
I will also be using this plugin, readable_test_names_runner, built by Leo Borges, so that I can test individual tests without having to run all the tests. If you don’t know about it, or have not used it yet, do it. It is good.
Filed under Ruby matchy mocha shoulda testing