Completely new programmer lacks direction


#1

Hi. I recently picked up a beginning ruby book, having only lightly
touched python and HLA before jumping into this, and I really lack the
vision needed to form any programs. It’s sort of a combination of not
quite having a strong enough grasp over the language and its functions
crossed against having absolutely no idea what kind of programs I want
to write.
So I’m just wondering what all of your first types of programs were…
simple, no doubt, but I’m just looking for a starting point.

Thank you! :slight_smile:
Cameron


#2

On Tue, Dec 9, 2008 at 11:18 AM, Cameron C.
removed_email_address@domain.invalidwrote:

Cameron

Posted via http://www.ruby-forum.com/.

Are there any simple tasks you perform regularly or semi-regularly on
your
computer that you don’t like doing or wouldn’t mind automating? That
can be
a good place to start.


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)


#3

Since you write that you’re new to programming, you might like Learn to
Program [ http://pragprog.com/titles/fr_ltp/learn-to-program ] by Chris
Pine. I’ve read good things about it in the past.

Regards,
Craig


#4

Cameron C. wrote:

Hi. I recently picked up a beginning ruby book, having only lightly
touched python and HLA before jumping into this, and I really lack the
vision needed to form any programs. It’s sort of a combination of not
quite having a strong enough grasp over the language and its functions
crossed against having absolutely no idea what kind of programs I want
to write.
So I’m just wondering what all of your first types of programs were…
simple, no doubt, but I’m just looking for a starting point.

Why are you interested in programming? What kind of things do you
propose to do with computer programs? (Hint: Think small. Your first
program won’t be a web browser, music player, or IM client. In fact I’d
say it shouldn’t even have a GUI. It should just write stuff to the
terminal.)

My first computer program computed the roots of a quadratic equation. A
lot of people start with a program that prints the lyrics to “99 bottles
of beer on the wall.”


#5

On Tue, Dec 9, 2008 at 6:34 PM, Craig D.
removed_email_address@domain.invalid wrote:

Since you write that you’re new to programming, you might like Learn to
Program [ http://pragprog.com/titles/fr_ltp/learn-to-program ] by Chris
Pine. I’ve read good things about it in the past.

Yeah I bought that for my girlfriend. Then she got a bit stuck on the
recursion exercise. I had a quick look
and was very impressed by the example. Its a small book, but its
proper stuff - its even covering Procs and
stuff by the end.

To the OP - motivation/inspiration is hard. The amount of seriously
cool stuff going on in the ruby world
can often be a distraction too. Its been a long time since Ruby was
cool for just one thing.

But you really need to start coding. Anything at all to build up the
muscle memory. Its hard to get excited
about a pet store rails example, but a twitter/flicker mashup is not bad
start.

If you are really stuck, check out the Ruby for Kids stuff- Shoes and
HacketyHack. Both of which passed
major milestones recently.

But ultimately, doing something you care about, that scratches an itch
you feel is the most important thing.


#6

On Dec 9, 10:18 am, Cameron C. removed_email_address@domain.invalid wrote:

Cameron

Posted viahttp://www.ruby-forum.com/.

My first program moving from Perl to Ruby was a program that colors
regular expression hits in text files and outputs to the terminal,
like a colored egrep command. My second program was a spelling word
quiz program for my son using Mac os x and the say command and a SQL
database to hold the words. Sometimes, I code simple programs to
calculate something I have calculated to see if I am right. For
instance what is the probability of rolling a Yatzee (6 of a kind) in
the game Yatzee. The answer is (1/6)^5 by the way. Adding a histogram
of the number of rolls required to get a Yatzee by 10,000 observers
makes the task more interesting. Stuff like that. I would suggest
getting the RUBY cookbook from O’rielly. They have lots of example
tasks and the code to accomplish it. You can easilly read it a few
pages at a time.
Tim


#7

On Tue, Dec 9, 2008 at 12:18 PM, Cameron C. removed_email_address@domain.invalid
wrote:

Hi. I recently picked up a beginning ruby book, having only lightly
touched python and HLA before jumping into this, and I really lack the
vision needed to form any programs. It’s sort of a combination of not
quite having a strong enough grasp over the language and its functions
crossed against having absolutely no idea what kind of programs I want
to write.
So I’m just wondering what all of your first types of programs were…
simple, no doubt, but I’m just looking for a starting point.

Someone in a previous thread from about a year ago answered a similar
question with something like: Pick a small task that will benefit you,
because then you will have more volition to finish it.

With that said, my first rubian (ruby dervish :slight_smile: was simply to grab
GPS NMEA statements using the serial port (much easier than it
sounds). After that, I took on a monumental project that was too much
for me, and it has been gathering dust ever since I started Ruby.
I’ll get back to it eventually.

Todd


#8

2008/12/9 Cameron C. removed_email_address@domain.invalid:

Hi. I recently picked up a beginning ruby book, having only lightly
touched python and HLA before jumping into this, and I really lack the
vision needed to form any programs. It’s sort of a combination of not
quite having a strong enough grasp over the language and its functions
crossed against having absolutely no idea what kind of programs I want
to write.

What is your motivation to dive into programming at all? Are you
familiar with mathematics and formal logic?

So I’m just wondering what all of your first types of programs were…
simple, no doubt, but I’m just looking for a starting point.

Another reasonably simple program would be a disk cleanup: find all
files and directories below some know temp directories and delete all
of them which are older than N days.

Cheers

robert


#9

Another good place to start would be “Practical Ruby Projects: Ideas
for the Eclectic Programmer” - http://bit.ly/BvOb

Lots of great ideas for starting a mini project of your own. Also,
look into Ruby Q…

Hope this helps.

Raju


#10

Cameron C. wrote:

Cameron
I’m reminded of the dilbert cartoon where the customer asks Alice if
she can’t write her program to figure out his specifications :wink:


#11

hi I started ruby a year ago and faced exactly the same problem as you.
If you do a search for posts under my name in quotes youll find some of
my earlier posts and reccs there.

If you havent got a good enough grounding to start confidently building
your first simple scripts then id say you should just go through the
chris pine learning to program book. Fortunately its not as dense as
other books and is an easy read plus it has exercise - a must for any
book thats aimed at learning. Once youve done that you should be more
comfortable with the language.

Thats what i did and after that i went on to the excellent book Everyday
Scripting. Dont let the testers part in the subtitle on amazon put you
off its suitable for everyone (other reviewers say so as well)
especially beginners. In that book youll be making actual scripts such
as an amazon screen scraper etc rather than exercises like 99 bottles.
Its a great book and like all good beginner books provides exercises for
you to practice with.

After that i dont think youll need pointers in what to do, youll know
enough that youll start thinking of things because you know you can
acomplish them. I think when you havent got the grasp of something your
subconcious seems to hide excellent project ideas from you!

I went on to make a simple ebay screen scraper as the commercial ebay
market research sites didnt cover something i needed.

Then a todo list in preparatino for rails

and now a budgeting app. They are all written for the console.

Oh and get really good with arrays and these libary methods .each
.collect .find .find_all .inject .join

you will use them all the time!
good luck!


#12

On Wed, Dec 10, 2008 at 1:28 AM, Aldric G.
<“aldric[remove]”@trevoke.net> wrote:

My first ‘real’ program in any language I use is usually “Guess a number
between x and y”.

This is an excellent first program, IMO. Start with having the
computer ask the user to guess a number, then add an option for the
user to think of a number and the computer to guess it.

martin


#13

On Dec 10, 2008, at 6:38 AM, Ron F. removed_email_address@domain.invalid wrote:

So I’m just wondering what all of your first types of programs
Michigan State University
East Lansing, MI 48824-1321

URL? Sounds funny!


#14

Ruby Developer wrote:

I think though the best way to go about it is to stay optimistic and do
what you love to do with programming. I’m going to learn to create
video-games with Ruby. :wink:

Plus, since Ruby was written in C, I could experiment with different
methods to implement. You see what I’m saying? I am a newbie myself, so
I can not tell you a whole great deal what to do. What I can say is my
bit of experience and what I’ve done so far, which is how I can easily
understand Ruby now. It’s the easiest language I have come across.


#15

Martin DeMello wrote:

On Wed, Dec 10, 2008 at 1:28 AM, Aldric G.
<“aldric[remove]”@trevoke.net> wrote:

My first ‘real’ program in any language I use is usually “Guess a number
between x and y”.

This is an excellent first program, IMO. Start with having the
computer ask the user to guess a number, then add an option for the
user to think of a number and the computer to guess it.

martin

I agree with Martin. My first programs were Hello World (like every
other beginning developer, no matter what computer language), Arithmetic
Formulas, then Algebraic Formulas like Martin created. I’ve done this
learning from the
http://www.ruby-lang.org website within the Twenty Minutes in Ruby.
Also, I’ve done a bit outside forming different ideas together. I’m
reviewing Chris P.'s Learn To Program on the same site, since I’m
currently on Chapter 7, going on to 8 out of the 10 chapters. When you
read it, it is simple and based upon
common-sense. If you do not figure out what Pine is referring to, just
wait for a moment in light thought, and whatever Ruby exercise you tried
will come to you. I’m going to go back over it with the ruby installed
this time to write more programs. I wanted to first give it a reading
type of feel before I started programming. One thing I like what Pine
said was in Ruby, you don’t have to know all of the methods, objects,
variables, etc. That is what the library is for. I think other
programmers would say the same.

I think though the best way to go about it is to stay optimistic and do
what you love to do with programming. I’m going to learn to create
video-games with Ruby. :wink: