Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


redleader posted:

what other careers are suitable for people with brains that make them stereotypical computer touchers

i contemplate the future of terrible programming with deep trepidation

you become the person telling the computer touches what to do

and in my case, get paid significantly more for doing it

Adbot
ADBOT LOVES YOU

mystes
May 31, 2006

RokosCockatrice posted:

The preponderance of web frameworks is evidence of just how awful browsers are. You don't have people year in and year out trying to write a new layer on top of C++ to make it bearable to work with, and you definitely don't have flocks of people ready to try your new C++ shim because you promise it'll make your lovely job better.
People do actually keep trying to write new gui frameworks and web frameworks for other languages

Maybe not c++, idk, but literally every other language

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

mystes posted:

People do actually keep trying to write new gui frameworks and web frameworks for other languages

Maybe not c++, idk, but literally every other language
c++ neckbeards are about to discover gopher, the web will soon follow

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
also people absolutely used to do that for c++ all the time. it looked different because the programming and paradigm were different: paid frameworks like qt, big grody oss ports of glib, wxwidgets, poo poo like that. and the point of all of them was to provide useful primitives that gloss over platform rendering differences and a consistent environment that made it possible to have shareable reusable components… you’re doing unironic RETVRN poo poo to a period that mostly never existed and to the extent it did exist sucked (like everybody that does unironic RETVRN poo poo)

MrMoo
Sep 14, 2000

boost::beast isn’t too bad as a c++ web api, but I think there are still no plans to even get to HTTP/2 despite “abstractions”. As if we’ll see HTTP/3 anytime soon, I love how much UDP and having a non-terrible event loop is impacting the development of supporting it at any reasonable speed.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

redleader posted:

what other careers are suitable for people with brains that make them stereotypical computer touchers

i contemplate the future of terrible programming with deep trepidation

bureaucrat
legislative aide

RokosCockatrice posted:

The preponderance of web frameworks is evidence of just how awful browsers are. You don't have people year in and year out trying to write a new layer on top of C++ to make it bearable to work with, and you definitely don't have flocks of people ready to try your new C++ shim because you promise it'll make your lovely job better.

this is true, it's why there are no c++ ui toolkits, new c++ versions, or complaints about c++

FlapYoJacks
Feb 12, 2009
Hello, I am a terrible programmer.

Armitag3
Mar 15, 2020

Forget it Jake, it's cybertown.


FlapYoJacks posted:

Hello, I am a terrible programmer.

pull up a chair if you can find one

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
fortunately the chairs were not built by terrible chairpeople so they function correctly as chairs

FlapYoJacks
Feb 12, 2009
I spent 40 minutes trying to figure out why sending an ERAL instruction to an EEPROM didn’t actually format the EEPROM. Turns out I forgot to enable writes to the EEPROM first. I am a terrible programmer.

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


FlapYoJacks posted:

I spent 40 minutes trying to figure out why sending an ERAL instruction to an EEPROM didn’t actually format the EEPROM. Turns out I forgot to enable writes to the EEPROM first. I am a terrible programmer.

only 40 minutes, that's pretty good

I give 2/10 on terribleness scale

FlapYoJacks
Feb 12, 2009

Private Speech posted:

only 40 minutes, that's pretty good

I give 2/10 on terribleness scale

OK but I’m the one who also wrote the enable writes method. Them immediately forgot to use it. :v:

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


FlapYoJacks posted:

OK but I’m the one who also wrote the enable writes method. Them immediately forgot to use it. :v:

okay 4/10 then, given additional context

FlapYoJacks
Feb 12, 2009

Private Speech posted:

okay 4/10 then, given additional context

I need to up my game if I am only registering a 40%!

CPColin
Sep 9, 2003

Big ol' smile.

pokeyman posted:

fortunately the chairs were not built by terrible chairpeople so they function correctly as chairs

Unfortunately, they're not protected by a mutex, so there's one chair with ten people sitting on it and eleven empty chairs

tef
May 30, 2004

-> some l-system crap ->

RokosCockatrice posted:

The preponderance of web frameworks is evidence of just how awful browsers are. You don't have people year in and year out trying to write a new layer on top of C++ to make it bearable to work with, and you definitely don't have flocks of people ready to try your new C++ shim because you promise it'll make your lovely job better.

that's because no-one writes new c++ projects :2bong:

well, outside of new build systems

FlapYoJacks
Feb 12, 2009

CPColin posted:

Unfortunately, they're not protected by a mutex, so there's one chair with ten people sitting on it and eleven empty chairs

wouldn’t chair sharing need a semaphore?

CPColin
Sep 9, 2003

Big ol' smile.
Depends on if you have a guy you walk up to and ask "which chair should I sit in?" vs if you walk up to each chair and ask if you can sit there, I guess

sb hermit
Dec 13, 2016





tef posted:

that's because no-one writes new c++ projects :2bong:

well, outside of new build systems

I just wrote a pair of new c++ programs for someone, one of which uses SDL2, and it’s very needs suiting and development was predictable and I really enjoyed it. I have to fix a bunch of bugs, do user testing and ui improvements, and maybe write a unit test or 2 (unlikely) but seeing someone else use a program you just wrote and be real happy with the prototype is the kind of good endorphin rush I need nowadays.

contrast this with my years long project to write a bunch of web apps for my online journaling and not a single line of code has been written because I’m still defining requirements and I really don’t want to learn javascript

sb hermit
Dec 13, 2016





FlapYoJacks posted:

Hello, I am a terrible programmer.

:same:

:smith::hf::smith:

FlapYoJacks
Feb 12, 2009
laughing my butt off because my overworked boss forgot to renew my contract before it expired. He sent it over this morning but due to time zone differences it won’t be processed until Monday because tomorrow is a holiday in Italy. 4 day weekend! :woop:

tef
May 30, 2004

-> some l-system crap ->

sb hermit posted:

I just wrote a pair of new c++ programs for someone, one of which uses SDL2, and it’s very needs suiting and development was predictable and I really enjoyed it. I have to fix a bunch of bugs, do user testing and ui improvements, and maybe write a unit test or 2 (unlikely) but seeing someone else use a program you just wrote and be real happy with the prototype is the kind of good endorphin rush I need nowadays.

contrast this with my years long project to write a bunch of web apps for my online journaling and not a single line of code has been written because I’m still defining requirements and I really don’t want to learn javascript

if i was forced to give a less asinine answer to 'why does javascript keep generating frameworks and c++ doesn't' than 'people don't write ++' i would say

there's multiple factors at work:

- there's way, way more javascript programmers than c++ programmers. simply put, there's more framework writing because there's more code writing.

- javascript is far cooler than c++, or, you're more likely to see javascript frameworks than you are c++ ones in the online gossip circuits

- unlike c++, javascript has a huge audience of casual beginners and entry-level professionals, and these people are the most likely people to have the free time to do so, the energy to do so, and the hubris to do so too.

- frameworks are easier to write than libraries. a framework is something you bolt code into, a library is something you bolt code onto.

- a c++ framework might as well be a different language: take qt, it brings it's own data structures, file i/o, network tooling to the point where you're not really writing c++, even before you consider things like moc

- it's easier to write frameworks when you have things like objects, reflection, or garbage collection, than it is to write frameworks when all you have is macros and code generation

- the browser api has changed a lot more in twenty years than an operating system api or a desktop gui toolkit, people write new tools to take advantage of new techniques

and finally, my asinine answer:

- compared to javascript, people in c++ just don't write new projects as much

Share Bear
Apr 27, 2004

of all the c++ programmers i know theyre all in games and looking to do poo poo in rust or zig if they can instead

thats just a tiny data point though, even asking itt people who write c++ say “dont write c++”

FlapYoJacks
Feb 12, 2009

Share Bear posted:

of all the c++ programmers i know theyre all in games and looking to do poo poo in rust or zig if they can instead

thats just a tiny data point though, even asking itt people who write c++ say “dont write c++”

As an embedded Linux toucher, in the last ten years, the preferred languages went from C/C++ to Rust/Python with C only coming into play if you are in RTOS/Bare metal/Kernel land. This is a good change.

sb hermit
Dec 13, 2016





I was going to try to use this project as a reason to pick up rust but covid19 caused me to lose a month.

I might still use rust for other stuff… it’s certainly something I want to get into.

Xarn
Jun 26, 2015
Yeah, C++ sucks. It pays my bills and Rust cannot replace it yet in some domains, so here I am, inflicting more C++ on the world.

sb hermit
Dec 13, 2016





tef posted:

if i was forced to give a less asinine answer to 'why does javascript keep generating frameworks and c++ doesn't' than 'people don't write ++' i would say

there's multiple factors at work:

- there's way, way more javascript programmers than c++ programmers. simply put, there's more framework writing because there's more code writing.

- javascript is far cooler than c++, or, you're more likely to see javascript frameworks than you are c++ ones in the online gossip circuits

- unlike c++, javascript has a huge audience of casual beginners and entry-level professionals, and these people are the most likely people to have the free time to do so, the energy to do so, and the hubris to do so too.

- frameworks are easier to write than libraries. a framework is something you bolt code into, a library is something you bolt code onto.

- a c++ framework might as well be a different language: take qt, it brings it's own data structures, file i/o, network tooling to the point where you're not really writing c++, even before you consider things like moc

- it's easier to write frameworks when you have things like objects, reflection, or garbage collection, than it is to write frameworks when all you have is macros and code generation

- the browser api has changed a lot more in twenty years than an operating system api or a desktop gui toolkit, people write new tools to take advantage of new techniques

and finally, my asinine answer:

- compared to javascript, people in c++ just don't write new projects as much

yeah, that’s definitely true

FlapYoJacks
Feb 12, 2009

Xarn posted:

Yeah, C++ sucks. It pays my bills and Rust cannot replace it yet in some domains, so here I am, inflicting more C++ on the world.

Modern C++17 and greater, if used correctly with RAII and unique pointers, isn't that bad. The biggest problem with it is that it's become much like PHP, where the old cruft isn't being removed due to backward compatibility. This isn't necessarily a bad thing, but compilers could do so much to help with this by having flags that would error out if you used the old ways with a message that says "stop managing your own memory and poo poo, there are better ways to do this now."

sb hermit
Dec 13, 2016





Nothing has given me more confidence in my low level programming than using valgrind, particularly to detect memory leaks and double-free because I’m not familiar with the APIs that I’m using and some of them allocate data on behalf of the caller that the caller has invoke free() themselves.

This, of course, would not be a problem in python (or less of a problem if you just have to explicitly free some resources for a long running application or process) or rust so a version 2 or version 3 of these toy apps would definitely use either of those instead of C++ (or only a small amount of shim code in swig).

FlapYoJacks
Feb 12, 2009

sb hermit posted:

Nothing has given me more confidence in my low-level programming than using Valgrind, mainly to detect memory leaks and double-free because I’m not familiar with the APIs that I’m using, and some of them allocate data on behalf of the caller that the caller has invoked free() themselves.

This, of course, would not be a problem in Python (or less of a problem if you have to free some resources for a long-running application or process explicitly) or Rust, so version 2 or version 3 of these toy apps would definitely use either of those instead of C++ (or only a small amount of shim code in swig).

Look at this drat fool with "user input" and allocating memory manually. Don't use Malloc, or you will find yourself in a heap of trouble! :v:

sb hermit
Dec 13, 2016





FlapYoJacks posted:

Look at this drat fool with "user input" and allocating memory manually. Don't use Malloc, or you will find yourself in a heap of trouble! :v:

:dadjoke:

Presto
Nov 22, 2002

Keep calm and Harry on.

Share Bear posted:

thats just a tiny data point though, even asking itt people who write c++ say “dont write c++”

Nah it's fine as long as you stick to 17 and up.

CPColin
Sep 9, 2003

Big ol' smile.
17 and up, eh? Technically it's ePHPebophilia

Bloody
Mar 3, 2013

redleader posted:

what other careers are suitable for people with brains that make them stereotypical computer touchers

i contemplate the future of terrible programming with deep trepidation

good question and if you come up with an answer let us know

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



omg its so hard to explain how thing do

just skip the thing, use it instead

pleaaaaaaaaase

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



i bet i coulda made that update faster and cheaper than this fuckin external dude did, and im an absolute idiot, a complete dumbass. but now we spent my day and his day on it and paid for it too, this owns

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

terrible programmer stories: we need to get some data off an ancient terminal ui (think curses) for a mainframe that is only accessible via SSH, because getting direct database access is apparently politically impossible, and the web api has only half the data we need

so after writing a straightforward c# backend service to query the web api, I'm now loving around with a docker that starts asciinema and trying to write a tcl script for expect(1) to navigate the 80s menus automatically

(I was hoping to do it in python but using asciinema as a library craps out with just error code 1)

has anybody used expect(1) in anger before? my beard is not that grey

distortion park
Apr 25, 2011


How much data is there? Do you have an intern handy?

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
Ok, the library says it spits out something of <unknown> type I'm supposed to iterate over. Typescript says to deal with this, first I need to know what the type is. Feels a little bit like a chicken and egg situation, but I can roll with this.

typeof thing? object
thing instanceof == Array? true.
Object.prototype.toString.call(thing)? string
thing.map((bit) => Object.prototype.toString.call(bit))? string
JSON.parse(thing)? Syntaxerror

God drat i hate this language.

Adbot
ADBOT LOVES YOU

mystes
May 31, 2006

I don't understand; you're trying to call JSON.parse on an array?

Also if it's just a type annotation problem with the library that's not typescript's or javascript's fault and you should just be able to cast it or use //@ts-ignore or whatever I think

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply