Personal computing discussed

Moderators: SecretSquirrel, just brew it!

 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Mon Sep 18, 2017 4:51 am

Egads, that was a long time ago! I haven't touched Transact-SQL in more than a decade. I still get occasional nibbles from recruiters looking for DBAs (these are summarily ignored).
Nostalgia isn't what it used to be.
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 23827
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Locate function in C++

Tue Sep 19, 2017 1:51 pm

Lots of comments like "VB sucks, VB projects fail" but exactly zero specificity as to why. I only have cursory knowledge of VB, but it seemed fine, I guess.

Or is this just another way of saying "C++ all the way because higher-level languages and frameworks like .NET suck and everyone is an idiot but me"?

I mean, I work in an all-Microsoft shop. I didn't pick the platform and I started as a support monkey so really who cares (as long as I work here, this is what I'm stuck with), but this just sounds like sour grapes because Microsoft has the dominant desktop platform.
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 2:04 pm

I think the biggest problem with it was that the barrier to entry was low enough that a fairly substantial percentage of production VB code was written by people who were very new to software development and had a very tenuous grasp of proper software design principles.
Nostalgia isn't what it used to be.
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 23827
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Locate function in C++

Tue Sep 19, 2017 2:13 pm

just brew it! wrote:
I think the biggest problem with it was that the barrier to entry was low enough that a fairly substantial percentage of production VB code was written by people who were very new to software development and had a very tenuous grasp of proper software design principles.

That's not really a problem with VB, then, but a problem with inexperienced people (like me!) using it sub-optimally and getting paid for it.

And I take comments like that seriously, because I'm busting my ass here trying to get better. It's frustrating that a relatively newcomer like me who wants to get better gets lumped in with people that have no interest in growing. The result isn't really all that different, but you can work with one of those categories and you can't work with the other.
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
Vhalidictes
Gold subscriber
Gerbil Jedi
Posts: 1647
Joined: Fri Jan 07, 2005 2:32 pm
Location: Paragon City, RI

Re: Locate function in C++

Tue Sep 19, 2017 2:32 pm

derFunkenstein wrote:
Lots of comments like "VB sucks, VB projects fail" but exactly zero specificity as to why. I only have cursory knowledge of VB, but it seemed fine, I guess.

Or is this just another way of saying "C++ all the way because higher-level languages and frameworks like .NET suck and everyone is an idiot but me"?.


derFunkenstein, it's not really about the programming languages themselves. It's about the MO of the programmer.

.NET = "I'm here to get this project done, and high-level languages increase my throughput."
Pros? Chance of project coming in on time and on budget.
Cons? Increased bugs from either the DE itself or some library found on Pastebin, typically a lack of deep programming knowledge that leads to poor performance.

C++ = "Low-level languages are more efficient, and I know exactly how to get the project done."
Pros? Lowered chance of bugs, typically better performance optimization.
Cons? No chance whatsoever of the project coming in on time or on budget. No one alive (including the original programmer after about a year) will be able to maintain the source in the future.
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 23827
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Locate function in C++

Tue Sep 19, 2017 2:39 pm

Now that totally makes sense.

The interesting thing at least in this Microsoft MVC app that hosts the web services I hit, the bugs aren't in the .NET code or the data returned by the service (or at least not very often). The problem is in the HTML5/JavaScript/Angular/Bootstrap stack they use for the UI (or the HTML/Angular code they're writing).
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
Redocbew
Gold subscriber
Graphmaster Gerbil
Posts: 1342
Joined: Sat Mar 15, 2014 11:44 am

Re: Locate function in C++

Tue Sep 19, 2017 2:45 pm

That also makes sense. Applications that have zero UI elements are often just left alone until something breaks down, because most people are reluctant to mess with the backend of a setup like that once they have it up and running with no or minimal problems. It might be a disaster design-wise, but so long as it's not giving anyone any trouble, and they don't have to interact with any part of it directly, then they'll probably just leave it alone.
Last edited by Redocbew on Tue Sep 19, 2017 3:23 pm, edited 1 time in total.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
Flying Fox
Gerbil God
Posts: 25417
Joined: Mon May 24, 2004 2:19 am
Contact:

Re: Locate function in C++

Tue Sep 19, 2017 2:59 pm

VB.NET was given the same broad brush as VB classic. Not saying VB.net is a problem free language, but since it runs on top of the CLR it can be written as properly as C#, most of the time. VB classic was kind of a mess.

Vhalidictes wrote:
C++ = "Low-level languages are more efficient, and I know exactly how to get the project done."
Pros? Lowered chance of bugs, typically better performance optimization.
Cons? No chance whatsoever of the project coming in on time or on budget. No one alive (including the original programmer after about a year) will be able to maintain the source in the future.

Really? Real C++ programmers would not assert C++ as "lower chance of bugs". Being an unmanaged language and the low level nature chance of bugs is actually much higher, even for an experienced person. Is it possible to write bug-free C++? Sure, but it is harder than higher level, garbage-collected languages. Performance optimization? Just because the code is written in C++ does not automatically mean performance is optimized. The optimizer has come a long way helping with the particular problem of template bloatedness, but written poorly C++ can be extremely inefficient too. Blanket statements like these for C++ are very dangerous.
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 23827
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Locate function in C++

Tue Sep 19, 2017 3:12 pm

Flying Fox wrote:
VB.NET was given the same broad brush as VB classic. Not saying VB.net is a problem free language, but since it runs on top of the CLR it can be written as properly as C#, most of the time. VB classic was kind of a mess.

Maybe this is why I'm confused. I have only ever used VB.NET in Visual Studio 2015. It seemed fine.
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 3:18 pm

Flying Fox wrote:
VB.NET was given the same broad brush as VB classic. Not saying VB.net is a problem free language, but since it runs on top of the CLR it can be written as properly as C#, most of the time. VB classic was kind of a mess.

Vhalidictes wrote:
C++ = "Low-level languages are more efficient, and I know exactly how to get the project done."
Pros? Lowered chance of bugs, typically better performance optimization.
Cons? No chance whatsoever of the project coming in on time or on budget. No one alive (including the original programmer after about a year) will be able to maintain the source in the future.

Really? Real C++ programmers would not assert C++ as "lower chance of bugs". Being an unmanaged language and the low level nature chance of bugs is actually much higher, even for an experienced person. Is it possible to write bug-free C++? Sure, but it is harder than higher level, garbage-collected languages. Performance optimization? Just because the code is written in C++ does not automatically mean performance is optimized. The optimizer has come a long way helping with the particular problem of template bloatedness, but written poorly C++ can be extremely inefficient too. Blanket statements like these for C++ are very dangerous.

I don't disagree.

However, one point which is often overlooked is that with C++ the performance is generally more predictable. Garbage collection in languages like Python and Java can occur at inconvenient times, and introduce a lot of variation in application performance.

Pathological worst case for this would be where memory pressure has caused part of the application's heap to get paged out to swap. In any language, this will cause some performance degradation whenever paged-out heap items are accessed. But with a GC language, you ALSO have the garbage collector to worry about; when it kicks in, it is going to sweep through the heap, touching ALL of it. If a large percentage of the heap has been paged out, this results in a sudden, massive burst of paging activity, lasting (possibly) many seconds, during which time the entire application appears to be frozen.
Nostalgia isn't what it used to be.
 
morphine
Gold subscriber
Gerbilus Supremus
Posts: 11406
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Locate function in C++

Tue Sep 19, 2017 4:04 pm

derFunkenstein wrote:
Maybe this is why I'm confused. I have only ever used VB.NET in Visual Studio 2015. It seemed fine.

Oh, my sweet summer child.

You never saw the dark days of winter.
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 23827
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Locate function in C++

Tue Sep 19, 2017 4:17 pm

I saw them through a different view - the view of a PC user who had to reboot his PC 3-4 times a day while using Windows 9x. LOL
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
meerkt
Gerbil Elite
Posts: 806
Joined: Sun Aug 25, 2013 2:55 am

Re: Locate function in C++

Tue Sep 19, 2017 4:25 pm

Vhalidictes wrote:
C++ ... No one alive (including the original programmer after about a year) will be able to maintain the source in the future.

That's a question of design and coding practices. C++ code, like most other serious languages, can be made perfectly readable and maintainable.

just brew it! wrote:
Garbage collection in languages like Python and Java can occur at inconvenient times, and introduce a lot of variation in application performance.
Isn't System.gc() helpful in some cases?
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 4:51 pm

meerkt wrote:
Vhalidictes wrote:
C++ ... No one alive (including the original programmer after about a year) will be able to maintain the source in the future.

That's a question of design and coding practices. C++ code, like most other serious languages, can be made perfectly readable and maintainable.

just brew it! wrote:
Garbage collection in languages like Python and Java can occur at inconvenient times, and introduce a lot of variation in application performance.
Isn't System.gc() helpful in some cases?

It can be.

Partially defeats the purpose of having a heap that is "fire and forget" though.
Nostalgia isn't what it used to be.
 
Vhalidictes
Gold subscriber
Gerbil Jedi
Posts: 1647
Joined: Fri Jan 07, 2005 2:32 pm
Location: Paragon City, RI

Re: Locate function in C++

Tue Sep 19, 2017 5:34 pm

At the risk of stating the obvious, I agree with all of the various replies.

I was answering DerFunkenstein's questions using generic stereotypes on purpose, and to add to some nuance programming is no longer my wheelhouse (it's been over 10 years now).

Good catch on .NET vs earlier MS SDE's, they had... issues. Queue "back in my day...." because I haven't touched Visual (x) since the turn of the century.
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 5:41 pm

Turn of the millennium, even! :lol:
Nostalgia isn't what it used to be.
 
Pancake
Gerbil First Class
Posts: 117
Joined: Mon Sep 19, 2011 2:04 am

Re: Locate function in C++

Tue Sep 19, 2017 7:27 pm

derFunkenstein wrote:
Lots of comments like "VB sucks, VB projects fail" but exactly zero specificity as to why. I only have cursory knowledge of VB, but it seemed fine, I guess.

Or is this just another way of saying "C++ all the way because higher-level languages and frameworks like .NET suck and everyone is an idiot but me"?

I mean, I work in an all-Microsoft shop. I didn't pick the platform and I started as a support monkey so really who cares (as long as I work here, this is what I'm stuck with), but this just sounds like sour grapes because Microsoft has the dominant desktop platform.


I'd be very selective about using C++ for new applications. Probably would have little use in general business computing as it's got too many pitfalls for inexperienced programmers. Sure, if you've got a core elite team working on a game engine or developing a core product then it has many advantages. Many years since I used C++ which was for DirectX/OpenGL graphics programming.

.Net is great as a general purpose framework although it is a bit limited in how you can deploy your codebase. Within that framework C# is great. VB.net not so much as it's being killed off by MS so no future there. For me, Java works great now. I can do solid engineering within it and can deploy to PC, Mac, Android and HTML 5 (using GWT). One core codebase, with lots of UI permutations for different targets. Fantastic.

VB6/VBA I still occasionally have to deal with for using or integrating legacy cruft. Completely does my head in. It's success wasn't so much that it was an easy way to learn programming (Turbo Pascal or whatever that became was so much better as a high level language where you didn't have to deal with pointers and memory management) but because it was so deeply integrated into MS software eg Excel, Word and I'm sure anyone in my age group has some recollection of the horrors of Access database applications. HO LEE FOOK!!!

Edit: of course, some history. In mid '90s MS was a malevolent monster squishing competing technologies. VBA was used by lots of other non-MS products because MS used their monopoly position to get their 'technology' integrated. Active X and VBA everywhere. I only have personal experience in the desktop GIS space.
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 8:50 pm

Pancake wrote:
VB6/VBA I still occasionally have to deal with for using or integrating legacy cruft. Completely does my head in. It's success wasn't so much that it was an easy way to learn programming (Turbo Pascal or whatever that became was so much better as a high level language where you didn't have to deal with pointers and memory management) but because it was so deeply integrated into MS software eg Excel, Word and I'm sure anyone in my age group has some recollection of the horrors of Access database applications. HO LEE FOOK!!!

How about this:

Picture a 3rd party application that needed to integrate with MS Word. Integration was initially attempted via OLE, but MS Word's OLE implementation was too unstable. To get around the OLE problems, the company producing this application eventually settled on a modified architecture that involved using a keyboard journal playback hook to stuff hotkey sequences into Word's keyboard queue. These hotkeys were configured in Word to invoke VBA macros that performed all the stuff that couldn't be done reliably with OLE. The VBA macros passed data back and forth to the 3rd party application via a DLL that had a shared data segment which was accessible to both Word and the external application.

I still have the mental scars from that project, over a decade later. :lol: Fortunately it wasn't my full-time job; it was a part-time gig that I was working on in the evenings to make a little extra cash.
Nostalgia isn't what it used to be.
 
Pancake
Gerbil First Class
Posts: 117
Joined: Mon Sep 19, 2011 2:04 am

Re: Locate function in C++

Tue Sep 19, 2017 9:16 pm

just brew it! wrote:
How about this:

Picture a 3rd party application that needed to integrate with MS Word. Integration was initially attempted via OLE, but MS Word's OLE implementation was too unstable. To get around the OLE problems, the company producing this application eventually settled on a modified architecture that involved using a keyboard journal playback hook to stuff hotkey sequences into Word's keyboard queue. These hotkeys were configured in Word to invoke VBA macros that performed all the stuff that couldn't be done reliably with OLE. The VBA macros passed data back and forth to the 3rd party application via a DLL that had a shared data segment which was accessible to both Word and the external application.

I still have the mental scars from that project, over a decade later. :lol: Fortunately it wasn't my full-time job; it was a part-time gig that I was working on in the evenings to make a little extra cash.


Oh I do picture that. I really do. And now I regret the extra large plate of beef brisket I had for breakfast.

Hideous hacks like these were just the done thing in MS-land. When you have that as the contemporary cultural context - the dominant paradigm - then things like application design and architecture seem like esoteric irrelevances. It's like if you had to survive in the bad lands of Somalia arguing why there wasn't a functional opera society. I avoided most of that during the '90s staying in UNIX (then Linux) land but would watch in horror from the outside. Then DirectX 8 came along and it was really good compared to OpenGL and the graphics card could do what the CPU could not for image processing. Visual Studio 6.0 was really good compared to GCC/makefiles/vi. Driver performance for graphics cards and quality in Windows XP was really good. So, I took my first dose of MS-crack and have been developing on and using Windows ever since.
 
just brew it!
Gold subscriber
Administrator
Posts: 49671
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Locate function in C++

Tue Sep 19, 2017 9:30 pm

The truly sad thing about that horrific Word hack was that there was theoretically a "right" way to do it (OLE), which was completely unworkable due to MS's inability to deliver a stable OLE interface with MS Word. When the official way isn't usable, you need to resort to that sort of crap.

I've been essentially out of the Windows development world for roughly a decade now, even counting the side jobs. Day job wise, it's been even longer. Mostly C/C++ and Python on Linux these days. And getting a crash course in Linux file system and memory management internals (a couple of co-workers and I have been running synthetic tests and spelunking through kernel code to figure out why certain usage patterns and/or newer kernel versions result in unexpected performance degradation).
Nostalgia isn't what it used to be.

Who is online

Users browsing this forum: No registered users and 1 guest