Prospective users... or is Pure BASIC good for me?
Prospective users... or is Pure BASIC good for me?
My last five months with PureBasic
=========================
I’m writing this post hoping that prospective users of Pure Basic will find it and have the confidence to buy a copy. I am not posting to ‘blow my own horn’, but to illustrate that PB is a capable and reliable BASIC compiler that can produce results that work in the real world. It’s easy to say “It works”, but as my most recent project illustrates “it works well.”
I work with a number of programmers on different projects, they mostly program embedded microprocessor applications in ‘C’, which is an appropriate language for what they do. I get to do the PC programming for end users applications and for the production department’s test systems; I have been doing this for over ten years and moved to PB after eight years of GFA BASIC (RIP old friend).
In June2007 my company was asked by a client to produce a demonstrator of a major system that we were to produce over the next year. The idea was to convince prospective end users that real hardware and code was in the pipeline and to get some initial feedback to finesse the specification of the ‘real product’.
The task involved creating a network system that forwarded data from up to 100 vehicle based clients via an existing mesh network to a server that archived all the data. The server also included tools to scan the archive and generate reports. The requests for the reports came from another management client application and real time and historic data was returned to it for display.
When I started the project I knew next to nothing about networks and because the vehicle hardware and software did not yet exist, I had to write a simulator for that as well. The other guys in the lab used the LWIP Ethernet library (free and highly recommended) for the vehicle based software, which runs on an H8 microprocessor,
I started by writing simple client and server programs and getting them to talk to each other, I learned about packets sizes, buffering and handling data that came in packets, sometimes all in a rush and sometimes as an intermittent trickle. To achieve this I used PB “as it comes” and created the source files with jaPBe, an extraordinarily good editor currently supported by Phillipe Guntz. It was great to have the client and server applications loaded in the editor at the same time and because PB’s compile times were next to nothing the learning process was only held up by my ability to understand what was going on.
(If anyone else takes this route I recommend “Computer Networks” by Andrew S Tanenbaum ISBN: 0-13-038488-7, which is a first class book that is both readable for background and full of technical detail and code snippets.)
Next, because I was well ahead of the ‘real hardware’ I added the simulator software into the vehicle based client plus an RS232 interface so I could input and forward real data taken from an earlier cut of the system. My thanks go to Marc Vitry for his easy to use and reliable RS232 library.
Now, with a flow of simulated or real data, I grew the Server application with its disk based Archive. The archive files grew and grew and I needed to be sure that they contained the required data, so I next wrote server modules that could analyse the Archive and produce reports; and although the processing overhead was significant I wrote the first cut of a user interface with lots of nice graphs. Most of this code ended up being used in the management client.
Next, I started writing the management client application that could send queries to the server and receive the reports, which it plotted and displayed to the company management. Up to this point I hade managed to avoid too many “wouldn’t it be nice ifs” (WIBNIFS), but with a demonstration looming I added real time data forwarding from the vehicle client simulators, via the Server to the management display clients; this took about two days of coding and worked first go, now the management display could show real time data from the vehicles, and historical data recovered from the Server.
The customer was really please when I sent him the first cut of the vehicle client simulator software and the management client. He could log onto a server on my desk and send simulated data, then launch a query and display the resultant graphs back on his desk… on another continent. (The customer is in the USA, I'm in UK.)
After several more iterations, including the addition of an interface to an SMS gateway (so messages could automatically be sent to the phones of service staff), and a report generator that printed daily vehicle performance summaries our client showed the system off to a senior American fleet manager. It all worked brilliantly and produced the reaction “Great! I’m getting my area managers together soon… come and show them… and could you please add these extra reports etc, etc.” Hooked!
The simulator client ended up as 2,200 lines of code, the Server is 3,500 lines, the management interface client is 3,100 lines and a configuration utility produced to test and configure the IP addresses etc into the hardware topped out at 1,129 lines of code.
All four of the programs (including multiple instances of the clients) could be run at the same time, on the same PC and have a CPU loading that is negligible except when large amounts of graphics are being drawn. This was a useful marketing feature because quick demonstrations could be given in a few minutes using a modest laptop.
The development of the complete system was very much an immersion job, most other tasks being put aside for the duration. I prefer to program this way, as do my colleagues. I can truthfully say that at no time did I have to wrestle with PB or jaPBE bugs; all faults and problems were due to my lack of understanding of network methods or plain stupidity. Never did I have to “work around” a compiler problem. Some suggestions put to the author of the jaPBe editor were acted on within a day or two; these were not bug-fixes, just ideas to help increase the efficiency of an already excellent (free) product. Thank you Phillipe
So, back to my original paragraph, I’m not trying to say I’m a clever programmer, rather that the Pure Basic compiler (costing less than a few hours of professional programmer’s charge out rate) allied with the jaPBe editor (free) allows me to fully exploit my limited abilities to the full. The more I learn the more I realise I have to learn; heck, I’m 65 next July and still lapping it up.
The Pure Basic support libraries (also free) that are produced by PB enthusiasts provide rich additions to Pure Basic’s regularly expanding command set. My finished software is fast, reliable and compact. The Pure Basic community is helpful and tolerant of people like me asking damn fool questions.
Almost finally; if you can justify to yourself, and/or your management, that you should NOT join the ‘Studio’ brigade, and take the plunge and try Pure Basic, I very much doubt you will regret it.
Really finally; a recently employed programmer who is responsible for the ‘big-real Server’ that will replace my demonstrator and who previously managed the hardware and networks for a 200+ user network in a university computing department made two comments:
First “Pure BASIC (Linux) looks good for quicky-jobs”, tried it and fallen in love.
Secondly, he said “How come I have not heard of Pure Basic before, from any of the thousands of students I had though the university department in recent years?” I think that is a question for you Fred.
PS: Next year when the system goes live I will ask my customer for permission to re-write this and let on what the project is really all about.
Richard L
=========================
I’m writing this post hoping that prospective users of Pure Basic will find it and have the confidence to buy a copy. I am not posting to ‘blow my own horn’, but to illustrate that PB is a capable and reliable BASIC compiler that can produce results that work in the real world. It’s easy to say “It works”, but as my most recent project illustrates “it works well.”
I work with a number of programmers on different projects, they mostly program embedded microprocessor applications in ‘C’, which is an appropriate language for what they do. I get to do the PC programming for end users applications and for the production department’s test systems; I have been doing this for over ten years and moved to PB after eight years of GFA BASIC (RIP old friend).
In June2007 my company was asked by a client to produce a demonstrator of a major system that we were to produce over the next year. The idea was to convince prospective end users that real hardware and code was in the pipeline and to get some initial feedback to finesse the specification of the ‘real product’.
The task involved creating a network system that forwarded data from up to 100 vehicle based clients via an existing mesh network to a server that archived all the data. The server also included tools to scan the archive and generate reports. The requests for the reports came from another management client application and real time and historic data was returned to it for display.
When I started the project I knew next to nothing about networks and because the vehicle hardware and software did not yet exist, I had to write a simulator for that as well. The other guys in the lab used the LWIP Ethernet library (free and highly recommended) for the vehicle based software, which runs on an H8 microprocessor,
I started by writing simple client and server programs and getting them to talk to each other, I learned about packets sizes, buffering and handling data that came in packets, sometimes all in a rush and sometimes as an intermittent trickle. To achieve this I used PB “as it comes” and created the source files with jaPBe, an extraordinarily good editor currently supported by Phillipe Guntz. It was great to have the client and server applications loaded in the editor at the same time and because PB’s compile times were next to nothing the learning process was only held up by my ability to understand what was going on.
(If anyone else takes this route I recommend “Computer Networks” by Andrew S Tanenbaum ISBN: 0-13-038488-7, which is a first class book that is both readable for background and full of technical detail and code snippets.)
Next, because I was well ahead of the ‘real hardware’ I added the simulator software into the vehicle based client plus an RS232 interface so I could input and forward real data taken from an earlier cut of the system. My thanks go to Marc Vitry for his easy to use and reliable RS232 library.
Now, with a flow of simulated or real data, I grew the Server application with its disk based Archive. The archive files grew and grew and I needed to be sure that they contained the required data, so I next wrote server modules that could analyse the Archive and produce reports; and although the processing overhead was significant I wrote the first cut of a user interface with lots of nice graphs. Most of this code ended up being used in the management client.
Next, I started writing the management client application that could send queries to the server and receive the reports, which it plotted and displayed to the company management. Up to this point I hade managed to avoid too many “wouldn’t it be nice ifs” (WIBNIFS), but with a demonstration looming I added real time data forwarding from the vehicle client simulators, via the Server to the management display clients; this took about two days of coding and worked first go, now the management display could show real time data from the vehicles, and historical data recovered from the Server.
The customer was really please when I sent him the first cut of the vehicle client simulator software and the management client. He could log onto a server on my desk and send simulated data, then launch a query and display the resultant graphs back on his desk… on another continent. (The customer is in the USA, I'm in UK.)
After several more iterations, including the addition of an interface to an SMS gateway (so messages could automatically be sent to the phones of service staff), and a report generator that printed daily vehicle performance summaries our client showed the system off to a senior American fleet manager. It all worked brilliantly and produced the reaction “Great! I’m getting my area managers together soon… come and show them… and could you please add these extra reports etc, etc.” Hooked!
The simulator client ended up as 2,200 lines of code, the Server is 3,500 lines, the management interface client is 3,100 lines and a configuration utility produced to test and configure the IP addresses etc into the hardware topped out at 1,129 lines of code.
All four of the programs (including multiple instances of the clients) could be run at the same time, on the same PC and have a CPU loading that is negligible except when large amounts of graphics are being drawn. This was a useful marketing feature because quick demonstrations could be given in a few minutes using a modest laptop.
The development of the complete system was very much an immersion job, most other tasks being put aside for the duration. I prefer to program this way, as do my colleagues. I can truthfully say that at no time did I have to wrestle with PB or jaPBE bugs; all faults and problems were due to my lack of understanding of network methods or plain stupidity. Never did I have to “work around” a compiler problem. Some suggestions put to the author of the jaPBe editor were acted on within a day or two; these were not bug-fixes, just ideas to help increase the efficiency of an already excellent (free) product. Thank you Phillipe
So, back to my original paragraph, I’m not trying to say I’m a clever programmer, rather that the Pure Basic compiler (costing less than a few hours of professional programmer’s charge out rate) allied with the jaPBe editor (free) allows me to fully exploit my limited abilities to the full. The more I learn the more I realise I have to learn; heck, I’m 65 next July and still lapping it up.
The Pure Basic support libraries (also free) that are produced by PB enthusiasts provide rich additions to Pure Basic’s regularly expanding command set. My finished software is fast, reliable and compact. The Pure Basic community is helpful and tolerant of people like me asking damn fool questions.
Almost finally; if you can justify to yourself, and/or your management, that you should NOT join the ‘Studio’ brigade, and take the plunge and try Pure Basic, I very much doubt you will regret it.
Really finally; a recently employed programmer who is responsible for the ‘big-real Server’ that will replace my demonstrator and who previously managed the hardware and networks for a 200+ user network in a university computing department made two comments:
First “Pure BASIC (Linux) looks good for quicky-jobs”, tried it and fallen in love.
Secondly, he said “How come I have not heard of Pure Basic before, from any of the thousands of students I had though the university department in recent years?” I think that is a question for you Fred.
PS: Next year when the system goes live I will ask my customer for permission to re-write this and let on what the project is really all about.
Richard L
Last edited by RichardL on Wed Nov 14, 2007 9:26 am, edited 2 times in total.
Very good, Richard.
My brother/partner developer has been after me for some time now to switch to a 'more robust' (VB) language, but so far he hasn't been able to come up with any set of requirements I can't satisfy using PB (usually with a little help from my (forum) friends)
And, up until now, I thought I was probably the oldest PB'er, but you've got me beat (ever so slightly
cheers
My brother/partner developer has been after me for some time now to switch to a 'more robust' (VB) language, but so far he hasn't been able to come up with any set of requirements I can't satisfy using PB (usually with a little help from my (forum) friends)

And, up until now, I thought I was probably the oldest PB'er, but you've got me beat (ever so slightly

cheers
It's always good to hear of PB being used successfully like this.
Personally I've moved away from VB to PB because I'm sick of doing things VB's way - I still use VBA and MSAccess for reporting, but right now I'm writing a job tracking system for a semiconductor factory in PB, it might not mollycoddle the programmer like VB does, but I love the control PB has over things.
So nobody consider switching to VB
- PB is more than capable of making serious business applications.
Personally I've moved away from VB to PB because I'm sick of doing things VB's way - I still use VBA and MSAccess for reporting, but right now I'm writing a job tracking system for a semiconductor factory in PB, it might not mollycoddle the programmer like VB does, but I love the control PB has over things.
So nobody consider switching to VB

Definately the best language ever. This language really is PURE. I wouldn't give it away for any other one. I know I sound a bit radical, but no other piece of software made me be so happy. PB is the way to go programming. With some marketing this could become something like C++ is today. Sometimes I feel that Fred doesn't realise the value of this programming language. If I had created something like this, I would spread it like hell. I don't wanna sound disrespectfull, not at all. Fred will always have my full respect! I know that doesn't mean much but I tell you: Marketing would make this language a STANDARD!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
I agree Inf0Byt3, just imagine how many would use it if it was free for example. Not that that's a good idea; I don't know (he could get money through ads). But I've never seen any ads FOR PureBasic on any page; so maybe using Google's AdWords could be a good idea to draw new people to this site.
I like logic, hence I dislike humans but love computers.
Yes, it's sad... all it's mojo (if you want) is being destroyed. I for one, even if my software will not be that good, i will have a line on my page stating the value of PureBasic!
[Edit]
And ffs i am not ashamed it has the "basic" word in the name. I laugh at the ones who write 500 lines of code for a bloody window! So go pure!
[Edit]
And ffs i am not ashamed it has the "basic" word in the name. I laugh at the ones who write 500 lines of code for a bloody window! So go pure!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)

Well you got my message. I didn't want it to sound that way but sometimes it's better to simplify things rather than make them more painfull

Even if I would have to switch to another language now (which i don't), it would be much easyer since I learned the base in a very enjoyable way

None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
- Rook Zimbabwe
- Addict
- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
- electrochrisso
- Addict
- Posts: 989
- Joined: Mon May 14, 2007 2:13 am
- Location: Darling River
-
- User
- Posts: 89
- Joined: Fri Apr 29, 2005 3:03 pm
- Location: Luxembourg
- Contact:
PB is a great language, but if you want to do something there are no built-in commands for it can be quite tough though...
C/C++ have got one big advantages: you can get virtually anything as a ready-made sample code, without having to port it from antoher language.
Of course, if you just want to hack together some small tool or if you don't need any "exotic" stuff, PB is THE language for you. Just compare the code needed to open a window with a button and a working eventloop: Not much more than a dozen lines in PB, but much more with C/C++...
C/C++ have got one big advantages: you can get virtually anything as a ready-made sample code, without having to port it from antoher language.
Of course, if you just want to hack together some small tool or if you don't need any "exotic" stuff, PB is THE language for you. Just compare the code needed to open a window with a button and a working eventloop: Not much more than a dozen lines in PB, but much more with C/C++...
"And God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof; And the spare rib, which God had taken from man, made he a woman, and brought her unto the man"