More Ruby Stuff

Standard

I spent some time this evening messing around with Ruby again – I wish I was dedicated enough to work on learning Ruby more frequently because it’s always such a pain to leave it for several weeks/months and then come back to it having forgotten almost everything. Like learning any language, repetition is the key to memorizing the syntax.

Anyway, here’s some code I slapped together this evening – something to track my run dates and distances. The added value in this code, versus my previous work with hashes, is that this offers the user a choice of options up front (add, update, display, delete).


run_miles = {
 "033016" => 2,
 "032916" => 1.85,
 "032816" => 1,
 "032116" => 3.5,}

puts "What would you like to do?"
puts "-- Type 'add' to add a run."
puts "-- Type 'update' to update a run."
puts "-- Type 'display' to display all runs."
puts "-- Type 'delete' to delete a run."

choice = gets.chomp
case choice
when "add" 
 puts "What is today's date in mmddyy format?"
 date = gets.chomp
 if run_miles[date].nil?
 puts "How many miles did you run?"
 miles = gets.chomp
 run_miles[date] = miles
 puts "A run on #{date} for #{miles} has been entered!"
 else
 puts "A run on #{date} of #{miles} has already been recorded!"
 end
when "update"
 puts "Enter the date in mmddyy format."
 date = gets.chomp
 if run_miles[date].nil?
 puts "Date not found!"
 else
 puts "What is the new mileage?"
 miles = gets.chomp
 run_miles[date] = miles
 puts "The run on #{date} has been updated to #{miles} miles!"
 end
when "display"
 run_miles.each do |date, miles|
 puts "#{date}: #{miles}"
 end
when "delete"
 puts "Which date do you want to delete?"
 date = gets.chomp
 if run_miles[date].nil?
 puts "Date not found!"
 else
 run_miles.delete(date)
 puts "#{Date} has been removed."
 end
else
 puts "Sorry, I didn't understand you."
end

It’s a cute little program – downloaded Ruby 2.2.4 on my Windows machine and ran it from the command line. I’d like to start getting into real web-based stuff soon.
 

Organizational Authenticity

Standard

I recently started listening to the Harvard Business Review Ideacast podcast. Today I enjoyed a thought-provoking Q&A with the author of Why Should Anyone Work Here, the topic of which was authentic organizations. The authors stated that authentic organizations share the following six criteria:

  • Difference beyond diversity. I want to work in an organization were I can be myself.
  • Radical Honesty. Tell me the truth before someone else does.
  • Extra Value. Add value, don’t exploit me, develop me.
  • Authenticity. Mean what you say and say what you mean. Don’t change the mission statement every three years because there’s widespread cynicism about that.
  • Meaning. I want a meaningful job in an organization which itself has meaning.
  • Simple Rules. I want to live and work in an organization which has created, agreed, simple rules, and not a fog of bureaucracy.

If you’re quick, you’ve noticed that the six words form the mnemonic DREAMS, which the authors use to say that an authentic organization is the “organization of your dreams”.

Easier said than done when you talk about creating an authentic organization, or transforming a highly political organization into an authentic one. But according to the authors, the long-term benefits of pursuing authenticity far outweigh the momentary struggle.

This is a big week at work I…

Status

This is a big week at work. I may be getting very close to resolving some longstanding issues that have prevented me from being the innovative, productive, eager employee that I want to be – or this might be my last hurrah. I’ll know by Thursday! How did I get to this point? Of all things, I just had to follow the formal process that was outlined in the organization’s complaint policy. Sounds simple, but it took quite a bit of courage for me to go that route. It is exciting to get results but I am still not sure what the end result will be. I have a couple of face-to-face situations coming up and I need to be able to communicate what may be a very unpopular opinion to people who are higher up the ladder than me, so I need to overcome the stress and anxiety and focus on how I feel, what I’m going through, and how I think these problems can be solved.