Tag: agile
long stand up meetings
Tag: ai
Classifier Evaluation
Tag: algorithms
project euler problem 4 in clojure
Tag: android
This is what we built in 24 hours
Tag: architecture
a few more thoughts on final classes
final classes are evil
spring 25 dependency injection that doesnt hurt
Dependency injection - DIÂ - Â is a great thing. Really. The hability to tweak implementations without touching your code is awesome and the DI frameworks, like spring, saves you a lot of coding. No more service locators stuff.
But, and there is always a but, you're left with a bunch of XML configuration. And I hate it. Not that XML files are bad... the thing is that everything nowadays has its own set of XML configurarion files. And Spring is not different.
scea 5 beta
Hoje fiz a versão beta da nova prova de arquiteto da Sun e eis algumas impressões:
- É longa e cansativa... fato justificável se levar-mos em consideração o fato de ser uma prova em estado beta. Ela possui mais questões que a versão final. São 153 questões no total, em 4h e 30min.
como o spring me ajudou a manter o active record
Nesse primeiro post vou falar um pouco sobre meu novo trabalho. Na verdade, sobre um problema que encontramos lá.
Dentre diversas coisas que estamos fazendo, como migrações por exemplo, estou ajudando na elaboração da arquitetura que irá abrigar as novas aplicações desenvolvidas na empresa.
Tag: atlassian
Mission accomplished
Tag: blockchain
Highlights of the Symposium on Blockchain and Distributed Ledger Technology - Day 1
Highlights of the Symposium on Blockchain and Distributed Ledger Technology - Day 2
Tag: books
Clojure Reactive Programming has been published
EuroClojure 2014 and announcing my book
Tag: clj-syd
Sean Corfield: Clojure and CFML sitting in a tree
clj syd report number 0
backlog ola bini on clojure conj
announcing the sydney clojure user group
Tag: clojure
Mission accomplished
The Clojure Sydney Meetup, four years in
Clojure Reactive Programming has been published
ClojureBridge Sydney, vol. I
EuroClojure 2014 and announcing my book
Validation and Internationalization in Clojure with bouncer & tower
CUFP/ICFP 2013
Purely functional data structures in Clojure: Red-Black Trees
Clojure, core.async and the Lisp advantage
Functional Programmers Unite! LambdaJam down under
clojure and why calculating is better than scheming
Purely functional data structures in Clojure: Leftist Heaps
bouncer validation lib for clojure
Monads in small bites - Part IV - Monads
Monads in small bites - Part III - Monoids
Monads in small bites - Part II - Applicative Functors
Monads in small bites - Part I - Functors
Clojure, leiningen 2 and Heroku: AOT compilation gotchas
Sean Corfield: Clojure and CFML sitting in a tree
clj syd report number 0
project euler problem 4 in clojure
backlog ola bini on clojure conj
announcing the sydney clojure user group
Report: Clojure Meetup - 1
Tag: codingdojo
coding dojo 1 the fun begins
Tag: concurrency
Clojure, core.async and the Lisp advantage
A Tale Of Concurrency: Partitioning Data Between Processes
Tag: conferences
Highlights of the Symposium on Blockchain and Distributed Ledger Technology - Day 1
Highlights of the Symposium on Blockchain and Distributed Ledger Technology - Day 2
EuroClojure 2014 and announcing my book
Functional Programmers Unite! LambdaJam down under
RubyConf Brazil 2011
my slides from rails summit 09
rails summit 2009 im speaking
railswaycon jruby internals by ola bini
qcon london 09
railsconf europe 2008 impressions and highlights
railsconf europe 2008 heading to berlin
the biggest rails event in latin america
euruko 2008 materials available
qcon 2008 slides available
euruko 2008 european rubyconf prague
qcon 2008 domain specific languages
qcon 2008 london
Tag: creativity
Be Bored
Tag: deepwork
Be Bored
Tag: dsl
qcon 2008 domain specific languages
Tag: euroclojure
EuroClojure 2014 and announcing my book
Tag: free-software
software livre
Tag: functional-data-structures
Purely functional data structures in Clojure: Red-Black Trees
Purely functional data structures in Clojure: Leftist Heaps
Tag: functional-programming
Clojure Reactive Programming has been published
EuroClojure 2014 and announcing my book
Functional composition with Monads, Kleislis and Functors
CUFP/ICFP 2013
Purely functional data structures in Clojure: Red-Black Trees
Functional Programmers Unite! LambdaJam down under
clojure and why calculating is better than scheming
Purely functional data structures in Clojure: Leftist Heaps
bouncer validation lib for clojure
Monads in small bites - Part IV - Monads
Monads in small bites - Part III - Monoids
Monads in small bites - Part II - Applicative Functors
Monads in small bites - Part I - Functors
Clojure, leiningen 2 and Heroku: AOT compilation gotchas
Sean Corfield: Clojure and CFML sitting in a tree
Tag: games
fallingdreams my very own tetris clone
Tag: git
A Few Useful Git Commands
git cheat shee
Tag: groovy
jvm language preferences poll results
Tag: haskell
CUFP/ICFP 2013
clojure and why calculating is better than scheming
Monads in small bites - Part IV - Monads
Monads in small bites - Part III - Monoids
Monads in small bites - Part II - Applicative Functors
Monads in small bites - Part I - Functors
Tag: html5
look ma no hands tweeting with your voice
Tag: ios
This is what we built in 24 hours
build automation with xcode 4 dot 3 kif and jenkins
Tag: ipad
build automation with xcode 4 dot 3 kif and jenkins
Tag: iphone
build automation with xcode 4 dot 3 kif and jenkins
Tag: java
fallingdreams my very own tetris clone
a few more thoughts on final classes
jvm language preferences poll results
jruby on rails and legacy java apps managing dependencies
google io thoughtworks on gae
helping the jruby effort debugging the source
railswaycon jruby internals by ola bini
jruby on rails and google app engine
final classes are evil
eclipse tip debugging non wtp projects
This is a very useful tip I shared a while ago at the office and turned out to be extremely useful.
If you work with java and use eclipse as an IDE you know that eclipse has something called WTP, which stands for Web Tools Platform. It's a set of tools and API's to aid in the development of web and JEE projects.
That means that if you have a WTP project in your workspace, you can deploy, run and debug it straight from the IDE. But what happens if your project is not of a WTP nature?
Back at the office we have a coupe of really old Java project. WTP didn't exist back then but we do use Eclipse as our IDE of choice.
So, how do we debug a deployed project that we don't actually deploy from the IDE? As long as you have the source, it is quite simple:
mock objects
why i like ruby or ruby the language of the lazy programmer
qcon 2008 domain specific languages
dbunit and hibernate
I never paid too much attention on testing database stuff. While working with java, the closest I got to something workable was using the test case abstractions provided by the Spring framework. It ensures that each test method runs in its own transaction that is rolled back after the test's execution.
Fair enough. I used the setUp() method on my TestCase to configure some records so I could work with them, removing all of them in the tearDown() method. It was quite simple and worked.
But I always felt something strange with this solution. First of all, I had to add another framework just for that. - Actually I was using spring for dependency injection, but if I wasn't, it wouldn't be a nice option. And another thing that bothered me, is that you cannot guarantee that your database is in a known state.
After I started to work with Ruby - and Rails - I discovered the testing fixtures. It is a really nice way to set up your testing data without having to worry about your database state. - If you don't know what I'm talking about, follow the above link first.
Then I received a message from a co-worker saying he was having some trouble in using DBUnit with Hibernate, and asked for some help. I've heard of DBUnit before but never tried it myself. It was a very good opportunity to take a better look into it.
The basic idea after all is very similar to that of the Rails Fixtures: You have some sort of external file - XML in this case - where you set up the testing data. So the framework takes care of erasing the database, inserting your test data and returning it to its original state.
So far so good, DBUnit's default Classes works with JDBC, DataSources and JNDIDatasources, but not with Hibernate. The effort to put them working together is minimal and is documented in their web site.
I decided to share how this can be done with hibernate and in the end, you would have a test case similar to this one:
spring 25 dependency injection that doesnt hurt
Dependency injection - DIÂ - Â is a great thing. Really. The hability to tweak implementations without touching your code is awesome and the DI frameworks, like spring, saves you a lot of coding. No more service locators stuff.
But, and there is always a but, you're left with a bunch of XML configuration. And I hate it. Not that XML files are bad... the thing is that everything nowadays has its own set of XML configurarion files. And Spring is not different.
eu odeio xml
Isso é um fato. Cada linha de XML que eu escrevo me faz pensar em formas de evita-las. E isso não é simples.
Ultimamente, desde o Java 5, tem se trocado o XML pelas annotations. Tá bom, fica bonitinho né? Até que fica. Em alguns casos, até mais organizado. O Hibernate desde a versão 3 faz uso das annotaions da JPA como alernativa ao seu XML de configuração. E esse sim é um belo caso de sucesso!
São apenas algumas anotações na classe para mapea-la e pronto, adeus xml! Mas como sempre, as anotações já estão sendo exageradas por aÃ. Basta decidir configurar uns 3 frameworks - e provavelmente dois deles são descenessários no seu projeto - usando anotações e as suas classes ficarão uma zona! E muito mais ilegÃveis que um arquivo XML!
As anotações são recursos muito poderosos e devem ser usadas de forma consciente. Use as que realmente valem a pena, como as que vou falar agora, que fazem parte da nova release do Spring framework, a 2.5 RC1.
scea 5 beta
Hoje fiz a versão beta da nova prova de arquiteto da Sun e eis algumas impressões:
- É longa e cansativa... fato justificável se levar-mos em consideração o fato de ser uma prova em estado beta. Ela possui mais questões que a versão final. São 153 questões no total, em 4h e 30min.
como o spring me ajudou a manter o active record
Nesse primeiro post vou falar um pouco sobre meu novo trabalho. Na verdade, sobre um problema que encontramos lá.
Dentre diversas coisas que estamos fazendo, como migrações por exemplo, estou ajudando na elaboração da arquitetura que irá abrigar as novas aplicações desenvolvidas na empresa.
Tag: javascript
simplejquery daterange picker
are_you_testing_your_javascript_yet
Tag: jruby
managing multiple ruby versions
refactoring for readability
rails summit 2009 im speaking
jvm language preferences poll results
jruby on rails and legacy java apps managing dependencies
google io thoughtworks on gae
helping the jruby effort debugging the source
railswaycon jruby internals by ola bini
rcov jruby and rcov_plugin
jruby on rails and google app engine
jruby db2 xquery bug
qcon 2008 slides available
Tag: jvm
jvm language preferences poll results
Tag: lambdajam
Functional Programmers Unite! LambdaJam down under
Tag: mac
mac os x getting mysql and rails to work
Tag: machine-learning
Classifier Evaluation
Tag: merb
merb turns 10 and started driving me crazy
Tag: misc
Mission accomplished
The Clojure Sydney Meetup, four years in
So long 2015: Year highlights
So long 2014: Year highlights
A new chapter begins
ClojureBridge Sydney, vol. I
So long 2013: Year highlights
So long 2012: Year highlights
So long 2011: Year highlights
Tag: ml
Classifier Evaluation
Tag: mobile
This is what we built in 24 hours
Tag: notices
new provider
Tag: objective-c
rottingnames for iphone available for free
learning objective c a ruby analogy
Tag: offers
were hiring
Tag: patterns
como o spring me ajudou a manter o active record
Nesse primeiro post vou falar um pouco sobre meu novo trabalho. Na verdade, sobre um problema que encontramos lá.
Dentre diversas coisas que estamos fazendo, como migrações por exemplo, estou ajudando na elaboração da arquitetura que irá abrigar as novas aplicações desenvolvidas na empresa.
Tag: performance
rails performance scripts profiler benchmarker
Tag: presentations
clouds against the floods presentation available
presentation spring framework
Tag: presentatios
clouds against the floods presentation available
presentation spring framework
Tag: productivity
Be Bored
how do you keep yourself focused
Tag: programming
fallingdreams my very own tetris clone
learning objective c a ruby analogy
how do you keep yourself focused
why every programmer have to be dumb
Tag: project-euler
project euler problem 4 in clojure
Tag: rails
look ma no hands tweeting with your voice
ide review rubymine
clouds against the floods presentation available
update to appconstants it can now be used as a gem
clouds against the floods
small update to appconstants
upgrading appconstants to rails 3
my take on rails environment specific constants
monit thinking sphinx and rvm
rails summit 2009 im speaking
rails rumble 09
jruby on rails and legacy java apps managing dependencies
rails readable test names run individual tests from the console
rcov jruby and rcov_plugin
jruby on rails and google app engine
rails performance scripts profiler benchmarker
dont use rexml i mean it
railsconf europe 2008 impressions and highlights
railsconf europe 2008 heading to berlin
mac os x getting mysql and rails to work
rails vulnerability on rexml
the biggest rails event in latin america
passenger mod_rails and problems with custom apache installation
euruko 2008 materials available
a couple of things from here
passengermod_rails released
jruby db2 xquery bug
qcon 2008 slides available
euruko 2008 european rubyconf prague
openid
rails 20 xml data type and db2
rails 20 scaffold
rubyworks production stack for rails
Well, we all know how hard, or at least cumbersome, it can be to set up a production environment to deploy your applications. Besides all the hardware stuff like storages, links, routers you are still left with a huge amount of software configuration to handle. This often includes configuring things like clusters, load balancing and services monitoring - Including notification of interested parts in case of any failure. Pieces of software you have to tie up and make them work together.
But hey, ruby lovers, you may have a better way to get this going! Released by ThoughtWorks, RubyWorks is, as quoted from their website, a production application stack for Ruby On Rails applications. I decided to give it a try and I really enjoyed it.
First of all I didn't want to mess with my actual configuration so I installed a new vm with Virtual Box. It has Ubuntu 7.10 on it, with 256MB of memory.
After installing RubyWorks - instructions on their website -, you get a new skeleton rails app up and running, being served by 4 mongrels that defaults to production environment! Impressed? There is more. A HAProxy is also set up in front of your mongrel servers acting as a load balancer.
Well, you probably want to monitor all that stuff huh? A monit web interface is waiting for your call on port 2812! It monitors all your mongrel servers - four by default - and your HAProxy, allowing you to measure CPU and Memory usage, among other things.
The coolest thing here is that all these softwares you would have to setup by hand are already working together, ready for production! Well, is it?
Going a little deeper, I deployed a database backed application to test this stack's performance.
I used Siege to stress the app and I am very happy with the results! I compared it with a single mongrel running on production env and no proxy at all.
It is worth mentioning that having 4 mongrels running took my vm to 77% of memory usage, while a single mongrel took it to 38%.
Tag: railsconf2008
railsconf europe 2008 impressions and highlights
Tag: railssummit2009
my slides from rails summit 09
Tag: railswaycon
railswaycon jruby internals by ola bini
Tag: refactoring
refactoring for readability
Tag: ruby
look ma no hands tweeting with your voice
ide review rubymine
clouds against the floods presentation available
update to appconstants it can now be used as a gem
clouds against the floods
small update to appconstants
upgrading appconstants to rails 3
learning objective c a ruby analogy
hacking rubys syntax
managing multiple ruby versions
refactoring for readability
rails summit 2009 im speaking
rails rumble 09
jvm language preferences poll results
procs lambdas blocks whats the difference
helping the jruby effort debugging the source
railswaycon jruby internals by ola bini
rails readable test names run individual tests from the console
rails performance scripts profiler benchmarker
merb turns 10 and started driving me crazy
understanding ruby threads
dont use rexml i mean it
railsconf europe 2008 impressions and highlights
railsconf europe 2008 heading to berlin
mac os x getting mysql and rails to work
rails vulnerability on rexml
why i like ruby 1 alias_method
the biggest rails event in latin america
passenger mod_rails and problems with custom apache installation
euruko 2008 materials available
a couple of things from here
passengermod_rails released
jruby db2 xquery bug
qcon 2008 slides available
why i like ruby or ruby the language of the lazy programmer
euruko 2008 european rubyconf prague
qcon 2008 domain specific languages
openid
rails 20 xml data type and db2
rails 20 scaffold
rubyworks production stack for rails
Well, we all know how hard, or at least cumbersome, it can be to set up a production environment to deploy your applications. Besides all the hardware stuff like storages, links, routers you are still left with a huge amount of software configuration to handle. This often includes configuring things like clusters, load balancing and services monitoring - Including notification of interested parts in case of any failure. Pieces of software you have to tie up and make them work together.
But hey, ruby lovers, you may have a better way to get this going! Released by ThoughtWorks, RubyWorks is, as quoted from their website, a production application stack for Ruby On Rails applications. I decided to give it a try and I really enjoyed it.
First of all I didn't want to mess with my actual configuration so I installed a new vm with Virtual Box. It has Ubuntu 7.10 on it, with 256MB of memory.
After installing RubyWorks - instructions on their website -, you get a new skeleton rails app up and running, being served by 4 mongrels that defaults to production environment! Impressed? There is more. A HAProxy is also set up in front of your mongrel servers acting as a load balancer.
Well, you probably want to monitor all that stuff huh? A monit web interface is waiting for your call on port 2812! It monitors all your mongrel servers - four by default - and your HAProxy, allowing you to measure CPU and Memory usage, among other things.
The coolest thing here is that all these softwares you would have to setup by hand are already working together, ready for production! Well, is it?
Going a little deeper, I deployed a database backed application to test this stack's performance.
I used Siege to stress the app and I am very happy with the results! I compared it with a single mongrel running on production env and no proxy at all.
It is worth mentioning that having 4 mongrels running took my vm to 77% of memory usage, while a single mongrel took it to 38%.
ruby on db2 a linux nightmare with a happy end
Tag: rubyconf2011
RubyConf Brazil 2011
Tag: scala
Functional composition with Monads, Kleislis and Functors
Functional Programmers Unite! LambdaJam down under
jvm language preferences poll results
Tag: security
rails vulnerability on rexml
Tag: sphinx
monit thinking sphinx and rvm
Tag: spring
spring 25 dependency injection that doesnt hurt
Dependency injection - DIÂ - Â is a great thing. Really. The hability to tweak implementations without touching your code is awesome and the DI frameworks, like spring, saves you a lot of coding. No more service locators stuff.
But, and there is always a but, you're left with a bunch of XML configuration. And I hate it. Not that XML files are bad... the thing is that everything nowadays has its own set of XML configurarion files. And Spring is not different.
eu odeio xml
Isso é um fato. Cada linha de XML que eu escrevo me faz pensar em formas de evita-las. E isso não é simples.
Ultimamente, desde o Java 5, tem se trocado o XML pelas annotations. Tá bom, fica bonitinho né? Até que fica. Em alguns casos, até mais organizado. O Hibernate desde a versão 3 faz uso das annotaions da JPA como alernativa ao seu XML de configuração. E esse sim é um belo caso de sucesso!
São apenas algumas anotações na classe para mapea-la e pronto, adeus xml! Mas como sempre, as anotações já estão sendo exageradas por aÃ. Basta decidir configurar uns 3 frameworks - e provavelmente dois deles são descenessários no seu projeto - usando anotações e as suas classes ficarão uma zona! E muito mais ilegÃveis que um arquivo XML!
As anotações são recursos muito poderosos e devem ser usadas de forma consciente. Use as que realmente valem a pena, como as que vou falar agora, que fazem parte da nova release do Spring framework, a 2.5 RC1.
como o spring me ajudou a manter o active record
Nesse primeiro post vou falar um pouco sobre meu novo trabalho. Na verdade, sobre um problema que encontramos lá.
Dentre diversas coisas que estamos fazendo, como migrações por exemplo, estou ajudando na elaboração da arquitetura que irá abrigar as novas aplicações desenvolvidas na empresa.
Tag: testing
are_you_testing_your_javascript_yet
rcov jruby and rcov_plugin
mock objects
dbunit and hibernate
I never paid too much attention on testing database stuff. While working with java, the closest I got to something workable was using the test case abstractions provided by the Spring framework. It ensures that each test method runs in its own transaction that is rolled back after the test's execution.
Fair enough. I used the setUp() method on my TestCase to configure some records so I could work with them, removing all of them in the tearDown() method. It was quite simple and worked.
But I always felt something strange with this solution. First of all, I had to add another framework just for that. - Actually I was using spring for dependency injection, but if I wasn't, it wouldn't be a nice option. And another thing that bothered me, is that you cannot guarantee that your database is in a known state.
After I started to work with Ruby - and Rails - I discovered the testing fixtures. It is a really nice way to set up your testing data without having to worry about your database state. - If you don't know what I'm talking about, follow the above link first.
Then I received a message from a co-worker saying he was having some trouble in using DBUnit with Hibernate, and asked for some help. I've heard of DBUnit before but never tried it myself. It was a very good opportunity to take a better look into it.
The basic idea after all is very similar to that of the Rails Fixtures: You have some sort of external file - XML in this case - where you set up the testing data. So the framework takes care of erasing the database, inserting your test data and returning it to its original state.
So far so good, DBUnit's default Classes works with JDBC, DataSources and JNDIDatasources, but not with Hibernate. The effort to put them working together is minimal and is documented in their web site.
I decided to share how this can be done with hibernate and in the end, you would have a test case similar to this one: