Main Menu

For the Techy boys

Started by Master Q, April 27, 2011, 11:32:12 PM

Previous topic - Next topic

Master Q

Tomorrow I think I'm going to start trying to learn C or CSS Code(Which ever one seems easier). I've never studied or even tried to learn one bit of code so wish me luck  :P If I learn C I think I have to learn C++ otherwise C is useless.

This will be my "diary" as I go along. I'm sure most of you don't know what I'm talking about, so in my entries I'll make sure some of it is in English  :P

roo boys!

I'm confused already hahaha :P

Good luck Q :)

Going to uni for this or just online?

nas

Is that what I think it is? Removal of protection say in DVD?

valkorum

You do realise that C (C++) and CSS are 2 completely different languages and used for 2 completely different purposes.

C++ is used for programming software
CSS (cascading style sheets) is used for layouts in conjunction with html/php/asp etc

bomberboy0618

My dad is a programmer so he would know this, but I have nfi.

hawk_88

As said earlier, CSS is not a programming language but a presentation description language used in generating the presentation of web pages. It isn't difficult to learn, but requires you to also learn HTML which also isn't difficult. The best website to learn from is W3Schools (http://www.w3schools.com/). It has a great set of tutorials for beginners and has a fantastic reference that pretty much every pro uses.

C/C++ are generally refereed to as the same thing. C++ essentially is an upgrade on C (those who are more experienced will know it isn't quite that simple, but that isn't important for most people). C++ adds greater support for something called object oriented design which is basically the corner stone of most modern programming. If you want to learn this I would just jump in an learn C++, not a great deal of value in starting with C in my opinion.

However, C/C++ is jumping in the deep end in many ways. It is low level and much more difficult to grasp some concepts and takes a lot more work to get anything tangible running. I think the best place to start would either by Python or C#. Both are higher level that C/C++ so you spend less time worrying about low level detail and more time learning the logic and flow behind programming. C# is closer to C/C++ that python so if your ultimate goal is to learn C/C++ I would start with C#.

valkorum

Nooooooooooooo not Python - I hated coding in Python.  Dont forget your spaces :P

Good description Hawk.  Another option would be to learn Java

hawk_88

Quote from: valkorum on April 28, 2011, 10:51:08 AM
Nooooooooooooo not Python - I hated coding in Python.  Dont forget your spaces :P

Good description Hawk.  Another option would be to learn Java

Python has it upsides. It's simplicity makes it a good option for a beginners language. Also given it can be used as a scripting language which is also a great feature for beginners. It has many great applications in industry, often used in conjunction with other languages. The only downside for a beginners language is that it has dynamic type, so it doesn't teach type which is a very important concept to grasp in my opinion.

As yes, watch your spaces....


As for Java, yes it is an option. The design philosophy of Java is spot on, but its implementation is poor and over time has become verbose and difficult to learn. C# came later with essentially the same design philosophy but did it right. C# is gaining quite a bit of traction in industry because of this and Java, although it is widely used, people are starting to move away from it.


Also, in my opinion, the best application of coding (and the most fun) is developing games. This should NEVER be done in Java despite the period where mobile games were developed solely in Java. Python has some nice basic libraries (I've used pygame a bit) to do this with and Microsoft has the XNA SDK (Software Development Kit) which allows easy development in C# not just on PC, but on Xbox 360 Windows Mobile 7 as well. For Xbox and Mobile development, it is free if you are a student (through https://www.dreamspark.com/default.aspx) or just $90 a year otherwise. You can initially develop on PC (for free) and move to the others when you feel you know enough.

valkorum

I remember writing, many years ago, a 1000+ line python script (was writing from scratch an Oracle database management script to work within Zope) and I forgot 1 space on a line.  Grrrrrrr

This was when I was learning python and the python guru then looked over my code and changed it to about 300 lines :(

hawk_88

Try forgetting a semi colon at the end of a struct declaration... the compiler error messages that come as a result of that are cryptic enough for an expert, let alone a beginner. 100 line programming assignment in C 101, 2 hours to code, 2 hours to find that missing semi colon that I'm not getting back.

valkorum

Been there done that.  I mainly do SQL and EDI coding these days - try forgetting a semi-colon or a comma in a big nested SQL statement.  The error message there is almost impossible to decipher.

Here was my latest one (happened this morning)

An error was encountered performing the requested operation:

ORA-01843:
01843. 00000
*Cause
*Action
Error ate line:2


The error was a missing comma between a to_date conversion ('28/04/2011','dd/mm/yyyy') and the line was line 56.  If you google ORA-01843 you find that it shows as an invalid date - so you start checking your dates (not for the damn comma)

Master Q

Thanks Valk and Hawk. I realise they are two very different things. I think I am going to jump into CSS as eventually I'm going to get into one of Adobe's products (Photoshop etc...), but do I need to know HTML before I try CSS?

valkorum

Quote from: Master Q on April 28, 2011, 11:39:36 AM
Thanks Valk and Hawk. I realise they are two very different things. I think I am going to jump into CSS as eventually I'm going to get into one of Adobe's products (Photoshop etc...), but do I need to know HTML before I try CSS?

You need to have a HTML page so you can reference the CSS file and use what you have written.  A CSS file by itself will do nothing.

As Hawk said - go to w3schools.com as they have some excellent tutorials and beginner classes (all for free)

hawk_88

Short answer, yes.

They are almost one and the same. They are rarely used separately and if you are a beginner there is no reason to ever use them separately - it will just confuse you.

Neither are too hard to grasp the basics, it just takes practice to become fluent. The best thing I can recommend after going through the W3Schools stuff is to try and modify some existing pages before you look to create your own so you get an idea of how larger more complex pages are structured.

To give you a basic idea:

HTML:
<h1>Sample Title</h1>

CSS:
h1
{
  color: #FF0000;
  font: Tahoma;
  font-weight: bold;
}


The HTML tag h1 is a level 1 title. The CSS style sheet says every level 1 title should be red, in Tahoma and bold. The HTML describes the content, the CSS describes how the content is displayed.

Add Photoshop and Illustrator (they work very well together) and then look at javascript and have you a very good basis in web development.

Master Q

Cheers boys. I'm on W3schools at the moment.

I found this and had a go - I changed a lot of it but I'm sure it's very easy: http://www.w3schools.com/css/tryit.asp?filename=trycss_default

So I have to learn HTML. Do I learn HTML or HTML 5? What is difference or are they the same thing?