Tuesday, January 6, 2009

Re: [BLUG] Looking to study further in computer science

On Tue, Jan 06, 2009 at 11:04:13AM -0500, Ben Shewmaker wrote:
> Thanks for everybody who replied to my question, it was very
> interesting reading the discussion that followed. Programming
> languages, much like Linux distributions, have their own strengths and
> weaknesses and also come with their evangelists and detractors, it
> would seem.

Most assuredly you are correct.

> From what I've been reading here and elsewhere what language is used
> for any particular project can depend greatly on the problem to be
> had, the organization working on said problem and the preferences of
> the people working on the problem.

In many cases the coding style changes just as frequently, too.

For instance, the GNU C folks have a particular coding style, but the
Linux kernel people (who also write in C) say to print it out and burn
it as it is total crap. They have their own coding style.

This isn't limited to C/C++. It is an issue in most languages. Some
languages (such as Python) have gone so far as to try to standardize
on official recommendations for style, but there is always a stickler
somewhere that wants some back-asswards method of structuring their code
because they think it looks better for some reason. (Number one being
exposure to another language.)

If you contribute to someone else's code, try to follow their coding
style. Never, *ever* make style changes in someone else's code. In your
patches, do everything you can to obey their coding style, even if you
think it makes absolutely no sense. Changing coding style (even in files
you write from scratch) it is a sure-fire way to have all your patches
ignored.

> I also liked what Jeffery said about fundamentals of programming.
> Perhaps it isn't that similar [...]

As an anecdote: I don't write PHP. I've never written PHP. I've never
read anything about PHP. I've never wanted to write anything in PHP.
A product I was using (which was written in PHP) had an annoying bug.
I used my general source skills to find the proper region of code,
and once I found the location, knowing the expected behavior, and the
produced behavior, I instantly knew the problem and how to fix the
problem. I had to scan other regions of the code to find how the author
was doing things, as I didn't really know how anything was done in PHP,
let alone the which of any two common options the author favored. (I
didn't even know the name of the else-if construct.) I did, however,
solve the issue quickly and accurately.

The fundamentals matter. As others have said, with the right
fundamentals and a good core understanding of general language features,
you can fairly easily move from one language to another as needed.

> This leads me to another question: What are some of your favorite
> resources for programming fundamentals? Books, blogs, websites?

For programming *fundamentals* I always found nothing beat good printed
documentation, some well-written examples, and a lot of practice. If
you're in doubt as to the accuracy of the documentation or quality of
the examples, I recommend leaning more heavily on the practice.

But what are programming fundamentals? In part, these are broad
programming features found in every language (like functions and
variable scoping). In part, these are programming techniques used for
any language (like object-oriented design (which you can do in any
language -- even assembly), rapid-prototyping, "agile" development,
etc). In part, these are specific core language features found in a
specific language (Pointers and Lvalues in C, function decorators in
Python, the $/@ variable prefixes in Perl). In part, these are specific
technologies usable in any language, but with differing semantics and
APIs (like network code -- while "BSD-style networking" is frequently
available, most of the time higher libraries are built up which are
preferred instead -- and required if you want to be cross-platform).

So many languages draw from C syntax, and/or directly from C libraries
that knowing enough about C to read an example and interpret it to your
language can be considered a fundamental skill if API documentation for
your chosen language is lacking.

I'm biased toward practice primarily because I'm self-taught. Certain
things work well from books. Book learning should cover all of the
fundamentals in principle, but only practice will prove whether you
understand things when you need them.

Don't worry about memorizing APIs. APIs always change. All you
really care about is that you remember enough to easily look up
the documentation in the future. That and you do care about the
fundamentals, of course.

> Or perhaps I can also ask what are important fundamental concepts
> I should grasp? I am eager to start practicing in any number of
> different languages, but I really want to make sure I understand
> why things work the way they do. I don't want to end up a mediocre
> programmer, slaving away in Java day after day building ucky software
> because I didn't build a solid base.

Heh. I covered an overview of the things I think are core concepts.

The same things apply with regards to learning programming as apply with
learning anything: Don't settle for rote answers. Ask questions until
you fully understand things. When you have documentation available, read
it for fun and not just to get a better grade.

In general, a brilliant example of your work always trumps school
grades. In the real world no one cares about your GPA, they only care
about whether or not you know your stuff. Unfortunately there are many
cases of people with "book smarts" who know everything on paper and got
great grades, but they're still crappy programmers. Having a degree does
help -- I won't deny that -- but only the most horrible work places care
more about that than about practical skills.

My father considers programming a fine art. There isn't a single one
of the arts, whether it be creative writing, playing music, painting,
sculpting, etc. where they don't lean heavily on understanding first the
basic principles, and secondly practice, practice, practice.

Cheers,
Steven Black

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Looking to study further in computer science

This discussion has been quite interesting. My son asked me a similar
question recently, so I have been forwarding many of the thoughtful
messages to him. Of course I have my own opinion on much of this, but it
is nice to have a wider range of opinions for someone who is already
through with his undergraduate education.
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Looking to study further in computer science

Comments below:

Ben Shewmaker wrote:
> when I was studying electronic music at the University of Miami, their
> big thing was teaching the fundamentals of digital/analog audio.
When I was at Purdue, all the computer engineers got the same basic
classes on electronics and semiconductors that the electrical engineers
got. The EEs got more semiconductors and analog/digital signals classes
later, and we moved to hardware design and systems programming once we
had a solid base.
> How do different types of synthesis work? What about MIDI?
When you understand how the underlying layers work, you can use them
more effectively. That applies almost universally.
> (and of course, many debates on why you just can't beat the sound of
> a true analog synth, like a Moog).
And many debates why you can't beat the audio quality and dynamic range
of vinyl?
> This leads me to another question: What are some of your favorite
> resources for programming fundamentals? Books, blogs, websites?
Wikipedia is a great start because it helps you know what to Google for.
I learned my C and C++ stuff from classes, but I learned PHP by Googling
around. For web development, w3schools.com is a great tutorial site for
the basics.
> Or perhaps I can also ask what are important fundamental concepts I
> should grasp? I am eager to start practicing in any number of
> different languages, but I really want to make sure I understand why
> things work the way they do. I don't want to end up a mediocre
> programmer, slaving away in Java day after day building ucky software
> because I didn't build a solid base.
You can write good code in Java, but it's a lot harder to do. I'm not a
fan of "easy" programming languages, because they let people get lazy.
Hypocrite that I am, I'm also a fan of Perl, which is often derided as a
"write-only" language.

Like I said before, I think everyone should learn C and write in it for
a while. If nothing else, it makes you appreciate the more modern
languages.
>
> Thanks again!
>
> Ben
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Looking to study further in computer science

For me it is books if I want to tackle a large topic like a new language or a framework. I
supplement heavily with blogs and websites.

For OO programming I would recommend any of Bruce Eckel's books (http://www.mindview.net/Books),
most of which are available for free or you can support his good work by buying them in bookstores.
Thinking in Java was an invaluable resource for me when I was learning both OO programming and
Java. He does a great job of explaining the fundamental concepts.

Josh


Ben Shewmaker wrote:
> Thanks for everybody who replied to my question, it was very interesting
> reading the discussion that followed. Programming languages, much like
> Linux distributions, have their own strengths and weaknesses and also
> come with their evangelists and detractors, it would seem. From what
> I've been reading here and elsewhere what language is used for any
> particular project can depend greatly on the problem to be had, the
> organization working on said problem and the preferences of the people
> working on the problem. I also liked what Jeffery said about
> fundamentals of programming. Perhaps it isn't that similar, but when I
> was studying electronic music at the University of Miami, their big
> thing was teaching the fundamentals of digital/analog audio. How do
> different types of synthesis work? What about MIDI? What are the
> basics of DAWs and how can you move from something like Pro Tools to
> Digital Performer? (and of course, many debates on why you just can't
> beat the sound of a true analog synth, like a Moog). There are
> multitudes of digital audio software packages out there and if you
> understand the fundamentals you can move between them. Sure, you'll
> have your favorite or maybe just one you've used so much that you can
> move around with ease, but if something new comes around that does
> something novel or useful, you can swtich over with a small learning
> curve.
>
> This leads me to another question: What are some of your favorite
> resources for programming fundamentals? Books, blogs, websites? Or
> perhaps I can also ask what are important fundamental concepts I should
> grasp? I am eager to start practicing in any number of different
> languages, but I really want to make sure I understand why things work
> the way they do. I don't want to end up a mediocre programmer, slaving
> away in Java day after day building ucky software because I didn't build
> a solid base.
>
> Thanks again!
>
> Ben
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Looking to study further in computer science

Thanks for everybody who replied to my question, it was very interesting reading the discussion that followed.  Programming languages, much like Linux distributions, have their own strengths and weaknesses and also come with their evangelists and detractors, it would seem.  From what I've been reading here and elsewhere what language is used for any particular project can depend greatly on the problem to be had, the organization working on said problem and the preferences of the people working on the problem.  I also liked what Jeffery said about fundamentals of programming.  Perhaps it isn't that similar, but when I was studying electronic music at the University of Miami, their big thing was teaching the fundamentals of digital/analog audio.  How do different types of synthesis work?  What about MIDI?  What are the basics of DAWs and how can you move from something like Pro Tools to Digital Performer?  (and of course, many debates on why you just can't beat the sound of a true analog synth, like a Moog).  There are multitudes of digital audio software packages out there and if you understand the fundamentals you can move between them.  Sure, you'll have your favorite or maybe just one you've used so much that you can move around with ease, but if something new comes around that does something novel or useful, you can swtich over with a small learning curve. 

This leads me to another question:  What are some of your favorite resources for programming fundamentals?  Books, blogs, websites?  Or perhaps I can also ask what are important fundamental concepts I should grasp?  I am eager to start practicing in any number of different languages, but I really want to make sure I understand why things work the way they do.  I don't want to end up a mediocre programmer, slaving away in Java day after day building ucky software because I didn't build a solid base.

Thanks again!

Ben

Sunday, January 4, 2009

RE: [BLUG] Looking to study further in computer science

My first thought is, learn how to program well and don’t worry as much about languages.  Languages go in and out of vogue (see: Pascal).  Furthermore, languages depend on the task being performed, the work environment, (pointy hair bosses), and the hardware/software environment.  However, if you know the fundamentals of programming, you can apply them to any language.  It’s amazing how far fundamentals, a good book (or website), and an API can take you. 

 

Currently, at work, I’m struggling with some truly crap-tastic C++ code.  The original programmer didn’t understand C++ and caused lots of memory leaks.  That was easily fixed.  Unfortunately, he didn’t understand the fundamentals of Object Oriented Programming either.  This has made everything hard to fix.  The code is very fragile. 

 

I wish I could rewrite it (a rewrite would have cost less at this point).  If I were to start over, I would write the hardware part in C.  I would write the graphical part and all the interesting bits in one of python or java (for portability).  I would then connect the two with a network interface (networking is already required) and call it a day. 

 

You should look at the FOSS projects , decide where you would like to help and learn those language being used.  Gnome projects (GTK) use C libraries.  KDE projects use a C++ libraries.  My Nokia 810 likes python mixed with GTK so I’m using python.  Contribution lines look good on a resume and in an interview. 

 

If you want to play with Linux, you should probably learn “make” and C at some point (in your spare time?).  The kernel and its modules are written in C.  There has been many a problem solved by changing one stupid line of C code.

 

Lastly, program in a language you like.  If you like java, run with it.  If you like scheme, have fun with it.  Doing interesting things in any language is good for you.

 

My 2 cents, enjoy your semester!

 

Jeffery

 

--

Jeffery Williams

Software Test Engineer

IU Cyclotron Facility

 

 

From: blug-bounces@cs.indiana.edu [mailto:blug-bounces@cs.indiana.edu] On Behalf Of Ben Shewmaker
Sent: Tuesday, December 30, 2008 1:28 PM
To: blug@cs.indiana.edu
Subject: [BLUG] Looking to study further in computer science

 

I just finished my first computer science class at IU (covering Scheme), and next semester the class I'm taking will be covering Unix, Emacs, and especially Java.  I'm wanting to push myself to learn something more at the same time (eventually I would love to get involved with some sort of open source project).  Would it be wise to try to learn more than one language at once in the first place, or would I be better served trying to learn more Java than the course covers?  What types of projects are developed with Java?  What other language would be useful to try to self learn?

Thanks for the info and Happy New Year everybody!

Saturday, January 3, 2009

Re: [BLUG] Looking to study further in computer science

On Wed, Dec 31, 2008 at 12:13:59PM -0800, robert piercy wrote:
> If you would like to do some web programming, then I would suggest
> php/mysql since many service providers support it (including Mark's
> company Suso). It is easy to get something up and running quickly.

I wanted to throw out a word of caution with regards to PHP.

It is easy to get something up quickly, and a lot of things do use it.

However it is also exceptionally easy to write insecure PHP.

So the initial learning curve seems small, but the learning curve to
reach a level where you're not writing insecure PHP is deceptively
steep.

Another note: Insecure PHP, when used for an open source project lacks
the obscurity benefit that insecure closed source projects have. People
can analyze your code for weaknesses and purposefully exploit it. This
does, in fact, happen.

You're still using a "LAMP stack" if your using Perl or Python. When
people talk about a LAMP stack they are not exclusively talking about
PHP.

Be careful if you are learning PHP to write web code. Even seasoned
professionals still make code that can be cracked when using PHP.
(Just like even seasoned professionals writing C sometimes have
issues with their pointers.)

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E