PureBasic as your first programming language!

Everything else that doesn't fall into one of the other PB categories.
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

PureBasic as your first programming language!

Post by Krix »

Hi guys,

This question is more for people with working experience using mainstream languages such as C, Objective-C, C++, C#, and Java.

Would you recommend PureBasic as a first programming language to somebody without any real coding experience? Can that person use the knowledge gained by learning PureBasic later on for learning C, Objective-C, C++, C#, or Java? I understand that PB is a procedural language by nature. So it's not a question about learning "good programming practices" like OOP vs Procedural but if one can use whatever he learns by coding in PureBasic later on in his/her programming career? I read before that PB is very much like C. So I guess an experienced PB programmer can pick up C much faster than an absolute beginner? The answer might look obvious. It's harder for the beginner without any programming experience...but the question is, how much the experienced PureBasic programmer has to "forget"...?

Any thoughts are welcome! Share your experiences!

Thank you!
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: PureBasic as your first programming language!

Post by Shield »

Hey Krix! :)

(Gee...my post got longer than expected. :mrgreen: )

Krix wrote:This question is more for people with working experience using mainstream languages such as C, Objective-C, C++, C#, and Java.
I have quite a bit of experience using languages from the C family. I know all of these except Objective-C.
The language I use by far the most is C#. :)
Krix wrote:Would you recommend PureBasic as a first programming language to somebody without any real coding experience?
That depends. PureBasic was indeed my first language when I was a real newbie. I basically knew nothing
about programming and not even much about computers but I always found it fascinating how applications are created.

So I gave PureBasic a shot and I don't regret it. :)
I've long moved away from using PB on a regularily basis because it just doesn't fit my needs anymore.
Mainly because of the lack of some features the "mainstream languages" provide ( ;) ) but also because of constant
syntax changes and annoying bugs that were in a couple of old PB versions.
Krix wrote: I understand that PB is a procedural language by nature. So it's not a question about learning "good programming practices" like OOP vs Procedural but if one can use whatever he learns by coding in PureBasic later on in his/her programming career?
What's very good about PureBasic as a starter language is that it's both easy to use and "low level" at the same time.
Unlike more abstract / easier / high level languages such as C# or Java, you actually learn how a computer works
while using PureBasic because you learn how to use pointers and be careful about memory usage / leaks etc.
I met many Java programmers that had no idea how a computer really works under the hood, which is kind of sad if you think about it. :(

However, regarding a programming career:
As I said, knowing PureBasic gives you a solid foundation you can build on, but it doesn't give you insight
on OOP or other programming paradigms (modules, reflection, overloading, etc. just to name a few) which are heavily used
in most software companies. So if programming students want to work in such companies they have to learn those things
by using another language. PureBasic just doesn't support that.
Krix wrote: I read before that PB is very much like C. So I guess an experienced PB programmer can pick up C much faster than an absolute beginner?
Definitely.
Krix wrote: ...but the question is, how much the experienced PureBasic programmer has to "forget"...?
As I said before, if you know PureBasic by heart and if you got some experience with native APIs such as WinAPI,
you can use pretty much anything for C what you know about programming in PB.
They might have different syntaxes but the overall concept is very similar. :)


In conclusion, I did never regret that I learned PureBasic first.
I might not use it very often these days, but it gave me the opportunity to get into programming.
Heck, I remember how much fun I had when I displayed I sprite on the screen for my first time!
This was so exciting and not even hard to accomplish for a beginner. :)


And this is a very crucial factor about programming languages...especially if it's the first one you use.
If you want to become a programmer or just write apps and games in your free time, you have to have fun.
There is nothing more important at the beginning. Programming is, by definition, solving problems.
And problems are frustrating. And it's a very, very thin line between becoming a good programmer and giving up in the beginning. :D



I hope I could give you some information you were looking for. :)
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PureBasic as your first programming language!

Post by srod »

I'd say that PB is a great place to start; heck any kind of coding, if it is enjoyable, will get things moving nicely. Get a feel for the kind of logic you need to employ to solve problems and the rest is just experience and a willingness to learn new syntax and new API's etc. Start with procedural and move to OOP or start with OOP and... it's all the same really.

I've never coded in C, but thanks to PB I can read C code quite readily now. That's not the same as coding in C I know, but it says something about PB nonetheless! :)
I may look like a mule, but I'm not a complete ass.
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Re: PureBasic as your first programming language!

Post by Krix »

:)

Thank you guys! Shield, I really appreciate your detailed answer. You definitely gave me the info I was looking for.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: PureBasic as your first programming language!

Post by X »

Good morning,

For my day job, I work with C# and Java. It is simply what the market requires (OO language experience). So ... not talking about PB, but more about functional languages. If you are looking at getting into the workforce as a programmer, you must learn an Object Oriented language. It is required.

With that said, at home, I use PureBasic as it is extremely fast, and fairly quick to write in that language.
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: PureBasic as your first programming language!

Post by Ramihyn_ »

Thats the whole problem. Knowing PureBasic does help you understand C, but companies will want you to use C#, Java or maybe C++ and not C.

Those are different concepts and IMHO you would need to forget more then you learned when you switch from PB to OO languages. With C#/C++ you usually use Visual Studio, with Java you may use Eclipse or another IDE. With PureBasic, you use the proprietary PureBasic IDE. Same for the Visual Designer and Debugger. All stuff you will need to relearn instead of feeling at home already.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: PureBasic as your first programming language!

Post by X »

I would haphazard to say that knowledge of both concepts is useful. When I first started working for the State, I was a Cobol and Natural programmer. Entirely functional. Then I moved on to C#, and Java, and the rest is history. Having knowledge of broth concepts is great. But also the fundamentals of programming which is required for both concepts is absolutely critical. That kind of knowledge can be found online, work-on-site, or even through schooling.

Just my 2 cents.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: PureBasic as your first programming language!

Post by Shield »

The thing is...first, you need to learn how programming works. That means solving problems on your own.
A programming language is just a tool. You learn how to program once in a language of your choice and you can adapt
your skills to any other language. You don't need to learn anything new once you understand the basic concepts.
For example, I understood OOP long before I started using it, just because it's logical the way it is. And this goes for any other
concept, pattern, paradigm etc.

The only thing you'll lack is experience. But that's a thing you can't force. It needs time, patience and some times hard work.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: PureBasic as your first programming language!

Post by Tenaja »

I really like PB; I'm "at home" with advanced basic languages like PB. I like Wend and EndIf instead of curly brackets. I also know (mostly) C, but some of the other C-like languages (hereafter called Cx), too. Here is my take.

If your goal is to test the waters with some fast results, or to learn to write code and get a few projects done just for fun, and have a skill to be productive just for yourself, then PB is perfect. It has a lot of capability, with quite a few libraries, and can get someone productive quickly. However, there are virtually no PB oriented jobs. (I just posted a couple informal polls on this in Off-Topic.) Also, there are no published plans to expand PB to the huge market of ARM (smart phones & tablets)--in fact, it has been stated that it will NOT be targeted. As a result, so you can only count on your code being useable only for the current platforms (Win, Mac, Linux)...and this is scary with the landscape being in such a tsunami of change, swinging towards ARM. There is no published "future plan" for PB, either, and unfortunately, it is being maintained by a couple guys with "day jobs." They do a good job, but "personal stuff" has slowed recent releases, and I can only imagine what will happen to the release timing after those guys get married with kids.

If your end goal is to learn Cx, then go straight to that language and learn it with a good book; you can't go wrong with any of them. If your goal is to get a programming job, then skip PB. If you learn Cx, your skills will 100% transfer to a job, and your code will likely be totally useable on at least several platforms (even future ones), if not all of them out there. Sure, you will learn the basics of program flow with PB, but you learn a lot of libraries and/or habits that will not transfer over, and you will have a lot of frustrations in converting.

With PB, your skills will grow faster than the Cx flavors...but will be only for self fulfillment or self-published work. There is a 99.9% chance--or more--that you will have to learn a different language to get a "real" job. On the other hand, you will be compiling sample code and modifying it within moments of installing PB. I, personally, would consider hiring a PB programmer if a good one was local, but just compare the PB forum activity with all of the C forums added up...fat chance of finding one. Then, if I did hire one, the replacement would have to learn PB to maintain old code. In the end, all things remaining equal, I'd hire the Cx guy...even as a PB fan.
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re: PureBasic as your first programming language!

Post by Blood »

Ramihyn_ wrote:Thats the whole problem. Knowing PureBasic does help you understand C, but companies will want you to use C#, Java or maybe C++ and not C.

Those are different concepts and IMHO you would need to forget more then you learned when you switch from PB to OO languages. With C#/C++ you usually use Visual Studio, with Java you may use Eclipse or another IDE. With PureBasic, you use the proprietary PureBasic IDE. Same for the Visual Designer and Debugger. All stuff you will need to relearn instead of feeling at home already.
This is actually a bit bias towards just using basic and never, ever moving on. Also C is still used a great deal of different places.

http://www.tiobe.com/index.php/content/ ... index.html

PureBasic is a great first language and will teach you a LOT about different aspects of programming. PureBasic is really a friendly, beginner's version of C, in that after you become proficient with PB, learning C is an absolute breeze (as mentioned from the people above).

It is however, extremely important that you must never stop at PB or basic fullstop! You must move on once you've learn the basic's (no pun intended). Because basic really is for beginners and to truly become a great programmer you must be able to use other languages.

Object Oriented Programming, for example, is not supported by PB because it is for beginners and OOP can be very daunting for some people. But to be professional and to be considered a good programmer by ANY other professional programmer you must learn OOP. If you only know one language, however well, you are NOT a great programmer! You are a big fish in a very small pond.

Once you become a great programmer, the language ceases to matter and you will be able to turn your hand to all languages and paradigms. You will also find you can pick up a new language and be productive with it in days.
Tenaja wrote:If your end goal is to learn Cx, then go straight to that language...
C, C++, and C# are extremely different languages, never confuse them as if they are the same language or extensions of one of the others. C is the simplest, followed by C# then C++. C and C++ compile to native executables, C# doesn't and is similar to Java in this respect. Programs written with one of these languages will NOT compile in another's compiler. This is important to understand.
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureBasic as your first programming language!

Post by IdeasVacuum »

PureBasic is a very fine language and you can learn a lot from it. In my view, which language you start off with does not matter much, just to learn the basics (no pun intended!). At the end of the day, your most-used language will be determined for you by the industry you work within. For example, C is widely used to develop large engineering programs, especially CAD-CAM. C and C++ are strongly related, C++ was effectively derived from C and indeed if you wish you can include C code within your C++ source and it will be accepted by most compilers.

I see a lot of people describing PureBasic as a 'hobbyist' language. It's ease of use is certainly attractive, but it is a professional language in every sense and you can produce excellent commercial applications with PB. Every craftsman has a personal choice of preferred tools - this is true of software developers as well. A lot of nonsense is spouted about which is the best language - there isn't a best one, though there are some very nice ones and there are some very poor ones too - frankly, you use the best tools available to you that suit the task in hand whenever possible. If that means you can perform a calculation better with an abacus than you can with a pocket calculator, then hell - I'd use the abacus every time! The line between Procedural languages and OOP languages is not as distinct as it may first seem, but since OOP has grown in the latter part of coding history, many of us have learnt OOP after Procedural or Modular methods. In short, pick a language, learn it, make a couple of apps that are useful to you. When you know how to drive that car, you can try another one!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: PureBasic as your first programming language!

Post by Tenaja »

IdeasVacuum wrote:PureBasic is... a professional language in every sense and you can produce excellent commercial applications with PB...
Not in EVERY sense... not in popularity--which is one of the most important in a "professional" atmosphere, and not in acceptance, which is almost as important as popularity.

Sure, it is has "average" capabilities compared to the "average" so-called "professional" language--maybe even better, since Fred has integrated so many libraries--but if you post PB as your primary skill on a resume, you will not be taken as seriously as anyone with similar skills in a curly-brace language.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureBasic as your first programming language!

Post by IdeasVacuum »

Well Tenja, speaking as an Employer, I would never judge a CV so superficially. I wouldn't want to work for someone so superficial either, though of course you are right - there are as many dumb employers as there are sheep in this world (may be more). :mrgreen:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: PureBasic as your first programming language!

Post by Env »

"You don't learn anything until you break something" - Words I live by...

And with PureBasic, making a mistake in code is so much easier to understand, and rectify - thus you learn quicker.


PureBasic was the first language I dabbled around with before moving on to C++... PureBasic does give you a good idea when it comes to the bog-standards like nesting, if/endif statements etc, which are the core to any language, and it does it in a nice friendly way that is easy to understand.. You can then up your game and learn about pointers, memory allocations, and so on, so yeah, PureBasic is a great language because it's learning curve is as steep as you want it to be.
Thanks!
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: PureBasic as your first programming language!

Post by djes »

BASIC was my first programming language, however, it was really basic ! Purebasic has this fundamental "do it easy" concept, but gives you the power to go at the core of a computer.

For me, this point is fundamental to create the kind of programs I like, and to be able to push limits. There's a lot of great concepts and programs everywhere, but who push them further ? The coder who knows how really works a computer. On who does the team rely to make the thing works ? On the lead coder who knows what is behind the hood. It's always the same, and in all areas of life : motors, electronic, even gardening !

If you want to be one day this kind of programmer, Purebasic is a great tool to start. It's fast, easy, and do the job, as it should be. This is another point : when you know a computer, you can't be surprised. If something happens, it's up to you, the user, to know why. You should know. Ask someone who starts with an OOP program how much memory will be taken if he's copying a string.

On another side, I don't have problems with people starting with OOP ; their mind will simply be different, more abstract. It doesn't mean they can't do good things. It's like architects and general contractor.
Post Reply