|
OK, Once again you just proved my point from my original reply.
If you are embedding a 250 entry array in VB.NET then you obviously have now idea how to program in this language. In VB.NET you would use the same method you would use in C#. Enough Said!
|
|
|
|
|
In C#, I'd break the array across multiple lines. In VB.NET I'd get a compile error for doing it, or put up with a bunch of nasty underscores.
If embedding an array is something you're "not supposed to do" in VB.NET it's not a real programming language.
We can declare arrays for a reason.
You think everything proves your point. I find that hilarious.
Real programmers use butterflies
|
|
|
|
|
Who cares What you think?
If you don't have the mental discipline or fortitude to reject picking up those "bad habits" then shame on you.
IMO your post is just an opportunity to brag about ALL of the languages you know and use, and bash languages others use like the "cool kids".
Languages are just tools. If you mash your thumb with a hammer, is it the hammer's fault?
Use the language you like. Ignore the "cool kids"
|
|
|
|
|
Wow, what crawled up your backside?
You're wrong about my intentions, and all you managed to accomplish was to be a jerk to someone that has never done anything to you.
And I'll remember it.
So congratulations. Smart move.
Real programmers use butterflies
|
|
|
|
|
Wow I am a little taken back at your comment to Slow Eddie but that is beside the point of my reply
Why am I a member here plain and simple this site has a wealth of Brains who do not waste time on
idle chit chat and I always find a honest sharing of ideas
Honey the Codewitch is one of those who has an alternate view on various subjects and that is nice
One thing I learned here is that you pick the development language based on what language best suits
the needs of the project
You do not pick up bad habits you develop them and begin to embrace them over time and if you are lucky one day someone like most of the members shares a review of your code and points out the bad habit so that said honey the codewitch I am sure you have enough self control to use BASIC
Why did I post this comment VB 6 and NS Basic for the Palm Pilot as well as Apple Basic on a 40 column
screen were my foundation to explore and use other high level languages YES Gif pointed out a bad habit
I rewrote the project and now that habit is gone
|
|
|
|
|
As far as Eddie's comment, I feel like my reply was measured given the tone and nature of it, and the fact that he impugned my motivations for writing my OP. I do try to be nice. But I'm not a pushover.
As far as your comment, I generally agree with you, but I've never had to write anything in BASIC or in python commercially. I'm thankful for it. Just like I'm thankful that my need for assembly and javascript in the field is limited.
If I had been coding in them all the time, I'd have to work extra hard to keep the stink of them from rubbing off on my coding style, so to speak.
That's why I avoid them. It doesn't mean I'll never use them. It's just I won't if I can help it.
Real programmers use butterflies
|
|
|
|
|
I care. I enjoy reading HTC's comments. Your comment was rude. Enjoy your hate.
|
|
|
|
|
Oh, come on you know you love to program in COW!
|
|
|
|
|
i'd like to master perl5. feels fun like js5. sadly, there is little hope things will change in the time department.
|
|
|
|
|
BASIC has grown over the years and is no longer the beginners language it once was thought to be. Basic started out as an interpreter because it was the only way to produce a multi-tasking system back in the 1970's. While Fortran programmers had to punch cards and wait until the computer dept. had time to run their code, hundreds of Basic programmers were coding and getting immediate results on terminal all around the college. Basic introduces the old computing world to time sharing and it actually was an amazing tool for its time.
In the 1980's Basic became a compiler rather than simply an interpreter. Microsoft embraced Basic with its QuickBasic and then PDS 7.1 (Professional Basic). One could code apps in Basic and link into modules written in Assembler, C or other languages. Notice Microsoft called their version of Basic , Professional !
In the 1980's Basic took on many of the best features found in other languages such as Pascal. Modular code design became the norm and the command set grew to embrace many modern constructs.
In the 1990's with the advent of Windows, Basic took a big hit at first until Microsoft bought a visual development tool from another company and turned it into Visual Basic. Classic VB was not built from the grown up, so it lost many of the powerful features of its DOS ancestor (PDS 7.1). It was a pcode compiler, not a true compiler. It lost many of its low level features. The one saving grace was the visual drag and drop environment and that is why it became so popular. It was years ahead of other languages when it came to drag and drop, but it did not take long for other languages to catch up. C was a little slow to catch up, but Delphi (Pascal for Windows) caught up and for awhile was a popular language for those who wanted the drag and drop of VB, but the power of C. Microsoft spent years playing catch up trying to bring VB forward and in the end (VB 5/6) they were only able to make it a true machine code compiler by using a C backend. VB itself never was a true compiler (meaning they had to use a different backend to accomplish it, rather than make VB itself a real compiler. Yet, it still was popular because of not only its drag and drop environment, but also because of its support of ActiveX and then later OCX controls. But those custom components usually were written in C, not VB. VB was not a true native code compiler in the sense you could not compile to a real native code DLL usable by other languages (ActiveX DLL's were not the same).
This did not mean that Basic totally failed. Many created commercial quality apps with classic VB. And other vendors were developing their own Basic languages. Some examples are CA Realizer, GFA Basic and others. They did some things right, but again they had weaknesses. For example some resorted to using the WIN32 API directly for a number of things without maing it easy for Basic programmers to learn how to work with the WIN32. Others concentrated in the Visual environment, but had other areas they were weak. The goal to compete with classic VB was just too much and most disappeared over time.
One Basic took a different approach and while it did not blossom like VB, it did have one advantage and amazingly is still around. In the DOS days Borland International competed with Microsoft in the programming language market. Turbo Basic was the only real competitor to QuickBasic and PDS 7.1. Borland didn't create Turbo Basic, but purchased it from another company and made it theirs. When Borland gave up on programming languages, they sold off big name tools Like Turbo Pascal (eventually became Delphi) and Turbo C to Embarcadero and they still exists today and are powerful professional tools. Borland sold Turbo Basic backs to its creator and under a new company and name became PowerBasic. While it has had some troubled times over the years, PowerBasic still exists and it is a powerful tool for any programmer. Why ?
Because Powerbasic is a native code WIN32 compiler which can compile EXEs and true DLL's (unlike classic VB only doing ActiveX DLLs) and the compiler has the raw power of C, but with the ease of Basic. While C has the advantage of being cross platform to a degree, Powerbasic can hold its own with C on the Windows platform. The compiler was written in x86 assembler and is lighting fast. Probably isn't a compiler around for any language which can compete with compile speed. One can compile a couple hundred thousand lines of code in a few seconds even on a cheap mass market PC (no need for the latest i7 CPU and 32 GB memory). I can compile 50,000 lines of WIN32 code in about 2 seconds even on my old HP business PC (which has been upgraded to 4Gb ram and a Intel(R) Core2 Q8200 2.33GHz CPU (quad core). Definitely not your typical developer PC with a core i7 and 32 GB ram.
So don't count out Basic yet. Might surprise most developers that Basic is not only still around, but it is quite powerful especially in the right hands.
|
|
|
|
|
VB.NET and C# have the same exact functionality. My criticism isn't about BASIC not being powerful. It's about it reinforcing poor habits due to the way it's structured and due to its syntax.
Real programmers use butterflies
|
|
|
|
|
The idea that Basic promotes bad code design and structure is false and without merit. Why ?
Because Basic uses a "different" style of coding than most programmers use today, but not necessarily a poorer one. What do I mean ?
Programmers , in what most of you younger programmers would call the old days or even ancient days, use to code in the procedural style of coding. In the early 2000's procedural programming took a big hit by the new up and coming Object Oriented Programming (aka. OOP) style. There was so much talk about how it would solve all our problems and make coding better, faster and more powerful. There were a lot of promises made and most jumped the "procedural" ship in favor of this new fangled style of coding.
There were some programmers who were not so sure about this new coding style and while they may have dabbled in it, they still held onto what they knew best, procedural. Their mindset was more of a wait and see if this new fangled coding style would deliver on all the promises made. Classic Visual Basic was a hybrid of sorts and only stepped into minimal OOP, but kept the procedural style of coding for the backend code (once you were in event code most coded using a procedural style at first).
In the C world, many procedural programmers jumped ship into C++ and started writing everything as a class rather than a function or procedure. But there were experienced programmers who took it slowly and did not totally give up on procedural design. So what conclusion have many of those old timers (and amazingly a number of newer younger programmers over time) come too having given OOP plenty of time to prove itself ?
While there are a few benefits to OOP, such as its tends to "force" programmers to write modular code, in the long run OOP has not delivers on all of its promises. Sadly OOP has brought us a new term "BLOAT". If one is honest and is willing to read many of the articles floating around the web by experienced programmers about the challenges and weaknesses of OOP, you will find that OOP created as many problems as it appeared to solve.
There is a slow, but real, movement among not only old time programmers, but also some younger ones, to take a closer look back at the tried and true procedural style of coding to see if it real was as bad as many say and whether it had any benefits now lost by using OOP for everything. The reality is the procedural style coding, whether Basic, C (rather than C++), Fortran, Java or Pascal still exists and it actually has many benefits.
At this point most of you younger (OOP based) programmers will likely shout out, "what in the world is he talking about" ?
Do a Google search for the following phrase:
how many software projects fail
You will that that the majority (more than 50%) of software projects fail. Some experts even suggest as high as 60% to 70% of software projects fail. While there are many reason for this, experienced programmers who have been around a long time (meaning they are likely in their 60's now, like myself) may suggest things like taking too long to develop an app, buggy software which can't be fixed, inability to quickly update software to keep up with schedules or the competitions sofware.
If you ask an old time Basic programmer, "why do you use such an old obsolete programming language such as basic " ?
The answers might surprise you. They likely will answer with things like:
"I can write software 10 times faster in Basic than I can with other languages"
"I can write easier to read code, which means easier to debug later"
"I can write code and come back to it years later and easily read it and make sense of it"
When you ask old time programmers why do they use a procedural language (no matter whether is it Basic, C, Fortan or Pascal) when everyone who matters today is using OOP, they will likely answer with:
"I can write neater, easier to read code and I can track code flow much better than with OOP"
"I can write apps without all the bloat of todays dot.net languages"
"My procedural apps can run circles around those OOP apps"
"If I want performance then it is the only way to code"
Likely many an old time C (not C++) programmers will respond as above.
Do I feel the same way ?
Absolutely! There is an old saying, "the proof is in the pudding". I know for a fact that if I had to rewrite my GUI framework (for Windows) using an OOP based language, it would be much, much slower, harder to debug and 5 to 10 times larger in size. My GUI framework for Windows (written in Powerbasic) calls directly to the WIN32 API, has a command set of over 1000 GUI commands, has a number of built in custom controls, its own Canvas control with a 2D Sprite engine and a glCanvas control (OpenGL based) with its own 3D scripting language, a Visual drag and drop engine for building programming visual designers and much more and the entire framework can fit on an ancient floppy disk disk. The entire framework (standard Windows DLLs) is only about 1 megabyte in size. This is about 1/3rd the size of the classic Visual Basic runtimes with many features not found in classic VB in any of its standard runtimes.
The only other language it could have been written in would have been pure C (not C++). But why code in C when I can code in Basic ? Much more readable code and easier to work with.
modified 8-Jun-21 12:15pm.
|
|
|
|
|
I disagree with most of your comment - or rather the parts were pertinent to BASIC's form and coding style (not the bit about projects failing which is a sidebar at best). I've had to embed too many arrays into a single line of basic code to ever be okay with their syntax.
The only other language it could have been written in would have been pure C (not C++).
I challenge you to produce C code that generates different assembly instructions than I can produce in C++ code.
You can literally write the same code in C++ that you can in C. You just do it differently.
Real programmers use butterflies
|
|
|
|
|
You young programmer just can't grasp the real differences between procedural code and OOP.
Try to understand, that us old dinosaurs (programmers in their 60's) use to write apps which would run on 1 megabyte RAM (not Gigabyte), run on a hard-drive which was only 20 megabytes in size or worse in a 1.44 megabyte floppy disk.
I wrote my first compiler for the Commodore 64 (using a Basic compiler) which only has 64 Kilobytes of Ram. I wrote a complete POS software package for a video rental store which ran on a Kaypro computer with 2 floppy disks (no harddrive) and 640 KB ram.
You learn something from writing code for computers with so little hardware capability. Todays programmers gasp if they had to use a PC with less than a core i7 and 32 Gb ram. I am shocked at how slow and bloated Visual Studio is today. No wonder why programmers need the best PC possible. My core development tools (Powerbasic and my GUI framework with its own Visual Designer) allows me to quickly write apps on almost PC I have around the house. Give me an old Windows 98 computer with 64 meg Ram (not GB) and I likely still could code on it with acceptable speed of development.
There are "real" C programmers today, that their entire development system would likely run on a PC which Visual Studio developers could even get their development tools to install on, none the less actual run.
I was actually one of those college students who when given a choice to punch out Fortran cards or code in a Basic interpreter on a green screened Terminal, was amazed at how quickly I could write code in that Terminal using simple old Basic. I don't use an interpreter anymore. I use a native code compiler for Windows, which allows me to compile at lightning speeds even tens of thousands of lines of code. I barely have time to take on sip of soda (not a coffee drinker) during the compile cycle for 50,000 lines of code, none the the less take a coffee break. Install the latest Visual Studio (if even possible) onto a PC with only 4 GB ram and less than a core i3 CPU) and with no SSD and see how long it takes you to to even run VS, none the less compile app of significant size.
OOP adds overhead to an app and also makes following code flow more challenging. Read an interesting blog post by an engineer at Intel on Intel's website about the significant problems object oriented coding brings when trying to debug code.
|
|
|
|
|
C++ is not an OO language. It is a multiparadigm language. Someone taught you C++ poorly, from the sounds of it.
I don't even use OO in C++ that often. I use generic programming
Again, I don't care about OO, GP, or whichever paradigm you use. I challenge you to produce one piece of C code that generates assembly that I cannot write in C++.
And OO doesn't produce any overhead you don't ask for.
Real programmers use butterflies
|
|
|
|
|
Perl and Python I have no use for, nor do I want to learn them. I've looked at them enough to know I don't like them. I've developed in Java and made a few products with it at a previous job, and I never want to touch it again if I can help it.
I grew up on BASIC with the commodore64, Apple II, and old IBM clones. It was a fun language to get started in, and sparked my interest in how computers actually worked, so I dived in deeper for harder languages.
the old BASIC is nothing like modern derivatives, beyond the name and some of the keywords.
I don't mind JavaScript, it's interesting, (fun and frustrating at times) and definitely has it's place. The same with C, it has it's place also. If anyone tries making a JS enabled microcontroller, they need their ass kicked, or a C script runtime for web development.
I've picked up assembly just for the knowledge of it, since there are times in the embedded world that dropping down into assembly is helpful.
I picked up ADA at my last job, it was used to program some scientific equipment oddly enough. I've played around with COBAL a bit and I don't hate it. I love D-lang but I'm afraid it won't ever hit main stream. Rust is awesome, but it's a 180° from JavaScript that I have to use daily, so it takes a minute to get back in the flow.
To each their own
|
|
|
|
|
Matt McGuire wrote: To each their own
Definitely. I have my opinions, but while I might sideeye a Perl developer the same way I wonder about what makes people pursue podiatry as a profession I won't judge them for it. *Somebody* has to code in the damn thing, after all.
As far as basic, I came up the same way you did it sounds like. Good old Applesoft BASIC in my case. I'm glad that was "the bad old days" and not today.
Still, line delimited languages give me a rash.
And VB.NET's syntax with respect to things like lambdas leave me googling all the time because the syntax is nonsense, and clearly a bag on the side - it wasn't designed with them in mind but rather added to the grammar after the fact and it shows.
There are sadly, folks who think running a scripting language (JS, Python), or a GC language (C#) on a 360kB system at 160MHz is a good idea. I am not one of those people. For starters, I don't care about RAD on an IoT device. I care about battery life.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I don't care about RAD on an IoT device. I care about battery life.
pretty much the same, and keeping as close to real time as possible on those little chips.
|
|
|
|
|
I'm going to be Devil's Advocate
I really like JavaScript / Typescript. Not because the language is the epitome of a well planned, cleanly architected, unambiguous and approachable language all kids should learn. It's not. It's a dog's breakfast. But because it works everywhere, it's not being owned by anyone, there's almost no religious wars going on around it, and because it's powerful, forgiving, and if you had to learn one language this one would be it. Full stack, front to back, every device (almost), every platform.
I also like and respect Python. Again: not what one would consider the cleanest, sanest evolution of a language, but it, like JavaScript, works pretty much everywhere, has a huge following, masses of libraries, and most importantly, is a great language for those who want to generate results rather than become artists. The difference between building a deck so you can have a BBQ as opposed to building a fully automated food preparation machine. I just want my burger and a beer and I don't need to understand structural engineering to get this thing completed.
Sure, Python is weird about spaces, but C-like languages are equally weird about closing brackets, and let's fact it - we all indent our code anyway. Maybe it was the 5 years in Purgatory doing FORTRAN that softened me but I find teaching a student how to code if/then statements or loops using Python to be less distracting than brackets for someone who's never seen code before.
My pet peeve: convention over configuration. It's like having to geek out and understand the backstory of all the characters in a movie, deeply, before you can sit down and watch the movie. The constant "WTF is going on?" with things like Entity Framework, for instance, just kills my soul every time I realise that if I'm to step off that very, very narrow line they've set, there will be Pain and there will be Misery.
cheers
Chris Maunder
|
|
|
|
|
Typescript I am okay with.
My problem with significant whitespace is this:
Some editors convert spaces to tabs, and so do web pages. Some don't.
Yes, I copy and paste. My own code. Sometimes other people's and from a variety of sources.
If my editor isn't "smart" what happens to my python script?
Real programmers use butterflies
|
|
|
|
|
Which editor do you use? I feel a little ignorant in saying I've never used an editor that does that. And I would probably uninstall it if it did! (too many years editing code blocks for CodeProject)
cheers
Chris Maunder
|
|
|
|
|
Visual Studio has an option to do it, as do some text editors I've used under linux (not remembering which ones offhand, one ships with Ubuntu)
But even if an editor doesn't, a web page will. Try copying from codeproject into a python script where you're using tabs (CP uses spaces for all of its indented code as far as I know)
EDIT: Oops I meant tabs to spaces!
Real programmers use butterflies
|
|
|
|
|
If you learn the language's idioms, you won't pick up any bad habits.
Programming languages are like spoken/written languages, you have to think in the language.
If you can treat programming languages like written and spoken languages, you won't pick up any bad habits.
Don't be like this: "You can program Fortran in any language"
~d~
|
|
|
|
|
end rant
only 7k lines of undocumented code with temp*this and temp*that.
sigh
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
The good C programmers would already have mimicked some C++ capabilities the hard way and would immediately start doing a decent job. The others should just be given bass boats.
|
|
|
|
|