"New to programming" on Monday Morning ... and understanding a program that reads and analyses a web access log file, reporting back on remote hosts that visited us and stayed for between one and five minutes by the end of Thursday. That's a good advert for Ruby - and a good advert for our
Learning to Program in Ruby course, and a good advert for Ruby too!
I have added the program that I wrote, with delegate help,
here (that's the source for you). The program - even after such a short time with the language - was already revealing useful information from the data about the metrics of visitors too our web site.
Have a look at the example to see Ruby code for quite complex structures (a hash of arrays of objects, no less), directory handling, formatting output, regular expression work, and much more.
I have files the source code, ironically, under "Introduction to Ruby". It's not the first thing you would write, but it's certainly an example of what you can do very quickly with the language ... and its OO structure and maintainability shines through. Some of the more awkward time handling algorithms are encapsulated and reused, and the code to identify which records are automata (spiders and other robots), which are web site attacks, and which are real users is all held in one small area too.
(written 2009-07-16, updated 2009-07-17)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q100 - Object Orientation and General technical topics - Learning to Progam [116] The next generation of programmer - (2004-11-13)
[1605] Learning and understanding scripting programming techniques - (2008-04-08)
[1963] Best source to learn Java (or Perl or PHP or Python) - (2008-12-28)
[1985] Learning to program as a part of your job - (2009-01-10)
[2001] I have not programmed before, and need to learn - (2009-01-19)
[2048] Learning to program in PHP, Python, Java or Lua ... - (2009-02-19)
[2092] Tracking difficult bugs, the programmer / customer relationship - (2009-03-20)
[2286] New to programming? It is natural (but needless) for you to be nervous - (2009-07-14)
[2326] Learn a new programming language this summer. - (2009-08-06)
[2504] Learning to program in ... - (2009-11-15)
[2505] I almost put the bins out this morning - (2009-11-16)
[2898] Programming Standards from the start! - (2010-08-02)
[2973] Learning to program - where to start if you have never programmed before - (2010-09-28)
[3120] Learning to write good programs in C and C++ - separating out repeated code - (2011-01-04)
[3551] Some terms used in programming (Biased towards Python) - (2011-12-12)
[3895] Flowchart to program - learning to program with Well House - (2012-10-14)
[4008] Reading and checking user inputs - first lessons - Ruby - (2013-02-17)
[4318] Learning to Program - how we start to teach you at Well House Consultants - (2014-11-16)
[4322] Learning to Program - the conditional statement (if) - (2014-11-21)
[4323] Learning to program - Loop statements such as while - (2014-11-22)
[4324] Learning to program - variables and constants - (2014-11-22)
[4325] Learning to program - what are algorithms and design patterns? - (2014-11-22)
[4326] Learning to program - comments, documentation and test code - (2014-11-22)
[4337] Learning to program sample program - past its prime, but still useful - (2014-12-02)
[4575] Learning not just what a program does, but how to design it in the first place. - (2015-11-06)
G907 - Well House Consultants - Recruitment and Career Development [198] A new skill may not be quick and easy - (2005-02-02)
[253] Finding the right holes - (2005-03-21)
[285] What career opportunities for web designers - (2005-04-20)
[389] Tough Love - (2005-07-25)
[408] Can an older person learn a programming language - (2005-08-10)
[503] 10 years C# knowledge please - (2005-11-23)
[585] Looking for Python staff - (2006-02-01)
[587] Job vacancy - double agent wanted - (2006-02-02)
[722] I'm answering a job applicant - (2006-05-16)
[729] Career development advice - (2006-05-23)
[751] Want to be a technical trainer in the UK? - (2006-06-08)
[759] Watch your Google profile - (2006-06-13)
[849] Staff Meeting - (2006-08-30)
[1967] LinkedIn - Thrice Asked, and joined. - (2008-12-30)
[2109] Why most training fails ... - (2009-03-30)
[2255] Past PHP delegates / others - coding help needed for next 3 months - (2009-06-23)
[3440] Research is exciting. But should routine be automated? - (2011-09-14)
[3490] How not to call when job seeking ... - (2011-10-20)
[3594] Back to Uni - (2012-01-26)
[3740] Looking and Learning - even on Holiday - (2012-05-22)
Some other Articles
Melksham Carnival Parade - the peopleStanding on the corner, Melksham CarnivalVariable scope - what is it, and how does it Ruby?The dog is not in troubleCan you learn to program in 4 days?Regular Expressions in RubyObject Orientation in Ruby - intermediate examplesCollection objects (array and hash) in RubyOpening and reading files - the ruby fundamentalspre-Inaugural briefing - Melksham Community Area Partnership