Who knows how to work with lazarus?

QuailPilot

Spaceman
I want to know how to do codeing, so I download lazarus. Who knows how to work it? It uses Borland Style coding. I do not know that ethier.:)
 
Well what do you want to write? What language are you trying to learn? What exactly is Lazarus, is that some kind of editor/compiler? I don't think there's any such thing as "Borland Style" coding...


Basically what do you want to write? A bunch of markup, a script, a real application?
 
Lazarus IDE is a programming suite in development, to be used with the so-called FreePascal compiler. Yes, gentlemen, this is all open source stuff.

Quail, start with someting decent, like learning C++.

Loaf, I admit that I don't get it. Which is probably better anyway.
 
C++ is about the WORST possible computer language to learn programming. It teaches bad style and hacked solutions. One should rather start with Pascal, Ada, Java,...
 
Heh, remember when everybody seriously pretended they thought everything that was successful or useful was actually bad?

The 1990s were so weird.
 
At least the more recent stuff has kept up with the tradition of creative error messages.
 

Attachments

  • pic_et_420.jpg
    pic_et_420.jpg
    18.6 KB · Views: 147
There are many reasons to want to learn to code. You have to find out why you want to learn how to code in the first place. THis will lead to one of the "levels" of programming languages you should start out with.

There are 4 levels -
1) Machine/Assembly code (they're sublevels, but very lowlevel)
2) Higher level assembly (e.g., C)
3) High level language (C++, Java, C#/.NET)
4) Very High Level Language (Perl, Python, batch/shell scripts)

Levels 1 and 2 are reserved for people who want to know how their machine works internally - how the CPU talks to devices, etc.

Level 3 is reserved for those who have been programming a while and know basically how computers work.

Level 4 is for practically all work that requires quick programming (prototyping), or very high level abstract concepts (e.g., artificial intelligence).

An important decision is how deep you want to go, too. Do you just want to write a quick one-off application? Become a programmer? Become a software developer? A one-off application is best done in a very high level language - they handle a lot of the nitty gritty and give you useful data structures that are practically plug and play. These languages offer a very quick way to develop sophisticated applications and are great for those that need instant gratitication.

A programmer (code monkey), would probably require you to learn the language du jour, which would be C++, Java or C#. You will take a design and algorithm designed by someone else (software architect or developer) and implement it.

A software developer is an extensive undertaking as you will be exposed to *all* levels of programming languages. This is important as though each language is different, deep down, inside they're all the same, and once you figure it out, it becomes a matter of syntax. The reason why you get exposed to all 4 levels is that each has powers that the other doesn't have. Level 4 languages make it easy to do very complex things very simply, but suck at optimizing code for a specific architecture. Level 3 languages give you more power, but then doing complex things requires writing more source code (and thus, more areas to hide a bug). Level 2 languages give you even more power still, but to do mildly complex things can take a *lot* of code (and a lot of it is very tedious code you'll rewrite because the library just doesn't cut it). And level 1 gets you ultimate power, but then it becomes very tedious coding complex things.

For example, let's take something fairly conceptually simple, like a string of characters. Let's say we want to append another string to it. Like we have "Hello" and "World", and we want "Hello World".

In a level 4 language, it's often just "adding" strings together - "Hello" + " " + "World". In a level 3 language, you'll have a string data type, which you'll declare, then you'll append using its built-in string append functions. In a level 2 language, you'll often have to use library functions to do it, because you'll have to allocate memory for the combined string, manually copy every letter from the first string into the buffer, then repeat until you've done it all. In a level 1 language, you'll have to manually get the memory buffer (or call an allocator library, passing the right values in the various registers and stack), then copy the letters around, keeping track of which register holds the current letter, the current position in the buffer, etc. And if you make a call, to save the right registers and restore them afterwards.

If you're not entirely sure why you want to code, start with a level 4 language. A level 3 language is nice, and "hot", but unless you're willing to learn, in a few years it won't be "hot" and you'll have to learn the new "hot" language.
 
I am not sure if I'd call shell scrip languages easier then regular programming languages. Personally I find Pascal or C++ easier and faster to code in many cases. Just take regular expression for example. VERY hard to learn IMHO.
I agree with the faster prototype assertion, however only if you know the language extremely well IMHO.
 
Pascal is an excellent language to learn to start off with, as it was designed to teach people how to program. Surely it makes sense to start by learning a programming language that was designed to teach people programming and the basic concepts?
 
My personnal favourite is Delphi, Borland's Object-Oriented Pascal. It's as powerfull as C++, yet much much much easier to learn and master. There is nothing you can do in C++ that you can't do under Delphi, although you may sometime need a few more lines of code...

What makes Pascal relatively easy to master compared to C++ is that it won't let you do something stupid; it's very strict on the data type and functions you can use, where in C++ you can fool around from data type to data type, use a pointer to access data without specifying it type, etc... wich is exactly what the "power" programmers like about C++.

BTW, Thomas Bruckner made his mission compiler for prophecy using the Pascal syntax, so if you learn Pascal you'll be halfway-ready to code WCP/SO missions using WCPPas :D
 
I prefer Visual C++.
Why? You can do almost anything. You can find compiler for any OS and CPU. Most SDK are in C++ anyway and I'm getting paid to use it. :)

QuailPilot, if you want to learn to code to work in the gaming industry, I suggest learning Visual C++. It's tough at first, but 97% of the gaming industry use it. DirectX, OpenGL and almost all physics and rendering engines are in C++.

You can also try Visual Basic or C# first. The syntax is almost like C++ and it's easier, but not as powerful. For free source code and tutorials you can check The Code Project.
You can download the free Visual Studio 2005 Express Edition Beta 2 on Microsoft Developer Network.
 
It turns out Lazarus was poisoning King Leoric's mind and kidnapped Prince Albrecht. You eventually kill him.
 
Actually, regular expressions are hard to learn. But they're also very powerful. And they're a reason why Perl, Python (Level 4) as well as modern Level 3 languages often have regular expressions as a built-in option (Java, .NET). In fact, it was one of the reasons Perl is a very popular language of analyzing text (usually logfiles, but any arbitrary text stream will work too) and extracting useful data out of it.

For a moderately complex search pattern, performing the equivalent of regex in C/C++ can take many lines of cryptic string manipulations. And if something changes, having to re-do the entire thing again is painful.

In fact, the compactness of a Level 4 language allows for quick prototyping as well as quick hacks (good and bad). If someone reads Ars Technica's latest Linux.Ars column, the guy writes a network sniffer that extracts HTTP transactions and prints out the URLs, in about 10 lines of code. A lot of heavy lifting is done by the interpreter, some regex, and the packet capture library. The packet capture library is a C library, so there's nothing special about the ruby binding doing hard work - it's already done for you by the library. But to do it in so few lines of code is very useful.

A more complex example followed by having an AIM sniffer in 30 lines - it just extracted lines of chat out and reformatted them nicely.

I'm someone who can do assembly, C, a bit of C++, and a smattering of perl and python. The right tool for the job - but for a lot of quick application work, I find perl and python much nicer to use - mostly because it's easier to maintain and traverse data structures using them, and a lot of applications require a mound of code for data structure maintainence to do their tasks.

Heck, try writing a simple text parser. It's difficult in assembly and C because of all the string mangling that goes on, and that's with the C library helping you out (there are tools like bison and yacc to make it easier, but there's a reason why those tools exist!). C++ makes bits of it easier, but like C and assembly, you'd still have to worry about really annoying lowlevel details to make sure you don't overrun your buffer. Perl/Python tend to have all the buffer stuff internalized, so you just go away with your logic, and leave the parsing to the language.

Edit: You can do anything in C and assembler. It depends on how much code you're willing to write to do it. I don't do MFC, for example, because I never had a desire or need to learn it. But I can write a simple Windows GUI app. It just takes me 100+ lines to get a window setup with menu, event loop, and basic events going (resize, minimize/maximize, close, menu items). You can do the same in assembler, too. The main problem is that you then get tied up in doing all the minutiae that the higher level logic gets clouded away in details. The more code one has to write to do something, the more code one has to go through to figure out what it does in 6 months. State machines are particularly fun - do it in assembly or C improperly and the state table gets clouded away.
 
Back
Top