Kontinuerlige leveranser – noen enkle spørsmål

Dette er en kort oppfølging til mitt mer omfattende innlegg om De kontinuerlige, (juni 2010). Kontinuerlige leveranser (kontinuerlig prodsetting/Continuous Deployment) er selve kjernen i kontinuerlige prosesser (slik jeg ser på smidige metoder). De er som den en ringen som binder dem alle sammen – unntatt den delen med ondskap.

Continue reading

Advertisements
Posted in ruby | 3 Comments

Intervju av intervjueren i mineverktøy.no – Thomas Kjeldahl Nilsson

Jeg har intervjuet intervjueren og latt ham svare på sine egne spørsmål. Dette er spørsmålene jeg stilte ham:

Thomas Kjeldahl Nilsson

Thomas Kjeldahl Nilsson

Hva er mineverktoy.no?

Hvorfor startet du mineverktoy.no?

Hvordan ser mineverktoy.no ut om ett år (mai 2012)?

Hva vil du svare på dine egne spørsmål?

Continue reading

Posted in agile, Java, personal, ruby | Tagged , | Leave a comment

ruby, cloud, nosql, agile, lean, everything and nothing

Welcome to my space. In this zone, I’m right and you’re wrong.I can say whatever I want and you will not be offended :)

This is my free zone, my unfolding space. I write about whatever interests me and sometimes I just like to share something I learned or discovered. The posts are mostly english, but some are in Norwegian when that’s natural. Any feedback is welcome!

Posted in ruby | Leave a comment

Ruby – Secure staging environment of your public app from users and bots

Context: App with public access, but you would like to prevent public access to staging (avoid google indexing and confused users).

Continue reading

Posted in rails, ruby | Tagged , , , , , , | 16 Comments

Lean – et minisammendrag fra foredrag

Lean er et utrolig stort tema, med et kraftig og viktig budskap! Her kommer et A4-ark jeg leverte ut i etterkant av mitt foredrag om lean. Dette er et subsett av idéene i lean, et godt et, samt noe snadder av sitater:

Continue reading

Posted in methodology, smidig | Tagged , , | Leave a comment

Spawning Multiple Threads at Heroku Using Parallel

Figure out the whys yourself. Here’s the how!

#lib/tasks/paralleltest.rb

# Q: Does spawning threads at heroku work?
task :paralleltest => :environment do
  res = "Who finished first? "
  Parallel.map 1..20, :in_threads => 4 do |nr|
    5.times { sleep rand; print "'#{nr}' " }
    puts "done with #{nr} "
    res += "#{nr} "
  end
  puts res
end

I’ve got the question in the rake task ” Q: Does spawning threads at heroku work? “. Well this is what running the rake task at heroku answered me

~/dev/app(master) $ heroku rake paralleltest --app myapp
(in /disk1/home/slugs/182581_156369f_19f1-5cf8dcaa-fc4b-4b21-a5e7-6fd85fad3e25/mnt)
'2' '4' '2' '3' '2' '1' '3' '4' '2' '1' '4' '3' '4' '4' done with 4 
'2' done with 2 
'1' '3' '5' '6' '3' done with 3 
'1' '7' '5' '6' '7' '1' done with 1 
'7' '6' '5' '6' '8' '7' '6' done with 6 
'5' '7' done with 7 
'10' '9' '8' '9' '5' done with 5 
'8' '10' '11' '8' '9' '8' done with 8 
'11' '10' '9' '12' '11' '10' '11' '9' done with 9 
'10' done with 10 
'11' done with 11 
'12' '14' '13' '13' '14' '13' '12' '15' '12' '15' '13' '15' '12' done with 12 
'14' '14' '16' '15' '14' done with 14 
'16' '13' done with 13 
'16' '17' '17' '18' '18' '16' '17' '16' done with 16 
'15' done with 15 
'19' '17' '19' '18' '17' done with 17 
'20' '20' '19' '19' '20' '20' '20' done with 20 
'18' '19' done with 19 
'18' done with 18 
Who finished first? 4 2 3 1 6 7 5 8 9 10 11 12 14 13 16 15 17 20 19 18 

I ran 4 threads on a 1 dyno app, using the parallel gem. The rand-function returns a number between 0 and 1, coincidences making ‘4’, ‘2’ and ‘3’ finish ahead of ‘1’. This is awesome and very useful. I love programming ruby!

Posted in rails, ruby | Tagged , , , , | 2 Comments

I Love Ruby! Part 1 of ∞? 10.times, run my tests

I had an integration test suite and thought “hmm, I’d like to run rake test ten times and study the logs and New Relic montoring results”. A few seconds later

~/myproject(master) $ ruby -e "10.times { puts \`rake test\` }"

and why not print out the local execution time as well?

~/myproject(master) $ time ruby -e "10.times { puts \`rake test\` }"

real 1m18.268s
user 0m33.873s
sys 0m11.305s

nifty? Now I can locate the slower parts of the app and improve them!

edit: You might like this better?

~/myproject(master) $ time ruby -e "10.times { system('rake test') }"

If you’re a programmer and don’t use a proper command line tool, you’re being an idiot. You’re probably not an idiot, so get a terminal now (windows: i.e use cygwin ). I’d wanted to say you’re an idiot for developing on windows, but then I remembered, nobody in their right minds would choose windows themselves, they’re all victims of corporate standards. What a pity. ;)

Posted in agile, ruby, smidig | Tagged , | 1 Comment