O Blog do Gustavo Felisberto

Gustavo Felisberto How to solve problems Print This Post Print This Post
 

Get component A.
Get component B.
Mix together using jSuperMixer or BlenderNet.
Try to find why it does not work using bad logs.

And their tears are filling up their glasses
No expression, no expression

This is how to solve problems That is what they tell you. Please believe it…. please understand that it is the way to do it.

If you spend 95% of the time hitting the technology and 5% working on the solution they something is really wrong with the tools you are using.

  1. require ‘monitor’
  2. class Helper < Monitor
  3.  
  4. attr_reader :threadCounter
  5. def initialize
  6.         @threadCounter = 0
  7.         super
  8. end
  9.  
  10. def getInfo(book)
  11.         start=false
  12.         while (!start)
  13.                 synchronize do
  14.                         if @threadCounter <= 5
  15.                                 @threadCounter+=1
  16.                                 start = true
  17.                         end
  18.                 end
  19.                 if !start
  20.                         sleep(rand(0)*50.0)
  21.                 end
  22.         end
  23.         doSomethinElse()
  24.         synchronize do
  25.                 @threadCounter-=1
  26.         end
  27.  
  28. end

I know that active waiting is bad(tm) thing, but I’m starting in the lang and I did it. I solved the problem and did not fight with the tool. Actually I was always feeling that the tool was helping me.

I find it hard to take
When people run in circles it’s a very very
Mad world