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.
 
  • Locked thread
FlapYoJacks
Feb 12, 2009
Lol if you don't regularly program in several different languages per day because you inherited a gigantic lovely program and you are the only one capable of actually keeping it together.


...


:smith:

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

ErIog posted:

Now the story of a wealthy company who lost a key member and the one software engineer who had no choice but to keep the project together. It's Arrested Software Development.

FlapYoJacks
Feb 12, 2009
You want to know how lovely the project is?

We roll our own Distro: CentOS 5.5, with iptables and SELinux turned off, and a default 5 alphanumeric all lowercase password for root.
Our application(s) all run as root and assume root privileges.


I just got approval to move us to CentOS6.7 with SELinux and IPtables turned on, and to fix the other gigantic gaping wounds of security that is our shitastic software.
Also to NOT loving ROLL OUR OWN GODDAMN OS FOR A APPLICATION. Holy poo poo whoever thought that was a good idea needs to be shot (hint: He moved to Japan to do programming because he likes Anime and "Japanese culture.")

FlapYoJacks fucked around with this message at 17:07 on Jan 18, 2016

FlapYoJacks
Feb 12, 2009

Bloody posted:

ah, you work for a bank

Nah, telecommunications VOIP company. But good guess!

FlapYoJacks
Feb 12, 2009

Barnyard Protein posted:

the real reason was probably "BECAUSE I CAAAN HUEHUHEUH!!!" -or- "Job Security :smuggo:"

Probably more like: SELinux gave an error? gently caress that *turns off*.

User permissions? gently caress that *run as root*.

Create an installer? gently caress that *modifies rpm's, builds own distro.*

Don't worry, it's all programmed in: C, C++, PHP, Python, HTML, CSS, and Pearl. I got this. :smug:

FlapYoJacks fucked around with this message at 17:34 on Jan 18, 2016

FlapYoJacks
Feb 12, 2009

ErIog posted:

He'll fit right in there. Japanese infosec is on another terrible level. They will probably think his anime obsession is weird, though.

Sweet Jesus, remind me to never look at Japanese source code.

FlapYoJacks
Feb 12, 2009

Powerful Two-Hander posted:

been there, done that, would not recommend.

iirc it was a vb gui onto a sybase database and they didnt understand indexes so performance sucked. also they didn't understand xml so the messages going into the system stored data as separated values in a series of notes fields because they wouldnt just add new bodes.

That would explain the xml parser this guy built before I fixed it. He will do nicely in Japan!

FlapYoJacks
Feb 12, 2009

MALE SHOEGAZE posted:

did he write nokigiri?

It was in python, so I doubt it.

FlapYoJacks
Feb 12, 2009

Heavily modified to the point of being unrecognizable! With Asterisk 1.4 running it!

Gonna move to Asterisk 1.8 and FBPX 2.11.

FlapYoJacks
Feb 12, 2009

my stepdads beer posted:

don't worry fpbx roll their own distro now too, and can't work out file permissions so make you change the httpd user to "asterisk". because asterisk, apache and php need its own distro??

Default FPBX has like, Eighty bajillion errors and warnings dumped into ssl_error_log whenever you click on a page. Why they can't figure out isset and DEFINING YOUR loving VARIABLES is beyond me!

FlapYoJacks
Feb 12, 2009
No programming language has a true strict mode. Strict mode should be you being disciplined not to be lovely.

FlapYoJacks
Feb 12, 2009

fart simpson posted:

what do you mean

Nobody is strict mode.

FlapYoJacks
Feb 12, 2009
Global mutable variables piss me off and should piss off every other programmer as well.

FlapYoJacks
Feb 12, 2009

NihilCredo posted:

re: numerical string conversion oddities

who the gently caress came up with the bright idea to use + as a string concatenation operator anyway

People who couldn't figure out how to strcat

FlapYoJacks
Feb 12, 2009

Jeffrey of YOSPOS posted:

If you're not gonna use a functional language, at least use C so you are categorically prevented from working with those OO idiots. Namaste.

Lol if you don't use OO C.

Phobeste posted:

oh nice you've never used c for large projects

I have, and if you can't use C for large projects you are bad at C or can't figure out how to use structs as objects.

FlapYoJacks fucked around with this message at 14:13 on Jan 22, 2016

FlapYoJacks
Feb 12, 2009

Yes, structs were a ripoff of classes :rolleyes:

FlapYoJacks
Feb 12, 2009

CPColin posted:

Just now, I wrote this:

code:
      int startId = loadStartId();
      int endId = processRows(startId);
      
      saveId(endId);
I could have written this:

code:
   saveId(processRows(loadStartId()));
I'm happy that I didn't.

Did you really not check any return values? Shameful.

FlapYoJacks
Feb 12, 2009

computer toucher posted:

Hello yes I am a terrible programmer. I made my first thing in Python and even though it's terrible it sure didn't stop me from making a GitHub account and publishing it: https://github.com/AnttiKurittu/check

using print and not print()? Shameful.

FlapYoJacks
Feb 12, 2009

Notorious b.s.d. posted:

they are both terrible but macros are much, much, much worse

As a embedded kernel dev, let me tell you how much manufactures like Macros and how awful they are.

FlapYoJacks
Feb 12, 2009

computer toucher posted:

so should I do an "import from __future__ print_function" and do a search/replace to change "print x" to "print(x)"?

Will it run in python 3 after that? Since I thought I'm writing this with Pyhton 2.7.11 I could safely use the old print function.

Are there some other advantages? I'm really still in the "hmm how do I open a file better google this"-stage.

idk, I'm just super used to print() instead of print. Idk if there's any real advantage too either way though.

Also print() works fine in python 2.7.

FlapYoJacks
Feb 12, 2009

computer toucher posted:

the last thing I wrote was in PHP so print "lol" just rolls out naturally from these poo poo-encrusted fingers.

Using print instead of printf or echo? What are you? Some kind of troglodyte?

FlapYoJacks
Feb 12, 2009
I use Eclipse CDT and actually like it.

FlapYoJacks
Feb 12, 2009

Symbolic Butt posted:

still gently caress inheritance

FlapYoJacks
Feb 12, 2009

Powerful Two-Hander posted:

ffffuck why would you create a class that contains fields then only ever create instances of it so you can call its methods which all return lists of the class itself

what the actual gently caress. why not just create a struct and return lists of that and put the methods in a namespace that makes some goddamn sense instead of it being in the "models" namespace and accessing them by creating instances of the model every single time

I once had a C++ "programmer" ask me what structs are for.

FlapYoJacks
Feb 12, 2009
H3Y GuY5; Ju57 P0571NG 0N 7h3 B357 P4G3.

FlapYoJacks
Feb 12, 2009

NihilCredo posted:

look at this scrub who doesn't even use uncontacted amazonian tribe tree bark scratches glyphs to implement ad-hoc polymorphism

I once had polymorphism go 3 levels deep and I felt REALLY bad.

FlapYoJacks
Feb 12, 2009

cinci zoo sniper posted:

terrible programmer question of the evening:

in python, i have for loops that do things, and for some of them i've set

code:
print "."
so its not all dead all the time. during heavier tasks though it just dies and then shits out a wall of dots once done. that's just python, or anything i can do about it without something ridiculous like printing on a different thread?
flush stdout yo.

FlapYoJacks
Feb 12, 2009

Luigi Thirty posted:

I ordered some RAM for my iMac off eBay from China. 3x 512MB PC-133 SDRAM.

one identifies as 512MB PC-100
one identifies as 256MB PC-133
one doesn't work

:rip:
Always buy Crucial. Always.

FlapYoJacks
Feb 12, 2009

John Big Booty posted:

It's just a char[].

BTW, if you ever wonder if you should learn C, you should. It'll make you more careful and you'll have a newfound appreciation for how much even the crappiest high-level language does for you.
I think it's time it was actually full of chars.

Knowing how memory management works at a lower level is always helpful.

And yeah, you appreciate "foo" + "bar" a hell of a lot more when you come from C.

FlapYoJacks
Feb 12, 2009

Luigi Thirty posted:

I have to write my own libc for Atari System 1

my malloc function just prints DON’T DYNAMICALLY ALLOCATE MEMORY ON A SYSTEM WITH 4KB OF RAM YOU IDIOT

You be in a heap of trouble!

FlapYoJacks
Feb 12, 2009

eschaton posted:

no, char foo[] vs. char *foo shouldn't affect the code generation at all

arrays in C are just syntactic sugar for pointers

Exactly.

foo[0] = 'b' is the same as *(foo) = 'b'
foo[1] = 'b' is the same as *(foo + 1) = 'b'

FlapYoJacks fucked around with this message at 15:29 on Jul 20, 2017

FlapYoJacks
Feb 12, 2009

What's hard to understand about that?

foo[1] is actually a pointer to foo + 1

edit*

I smashed 0 instead of 1 like a retard.

C++ code:
#include <stdio.h>


int main(void){
 
    char foo[4] = "bar";
    printf("%s\n", foo); /* prints bar */
    foo[0] = 'j';
    printf("%s\n", foo); /* prints jar */
    *(foo) = 't';
    printf("%s\n", foo); /* prints tar */
    *(foo + 2) = 'g';
    printf("%s\n", foo); /* prints tag */
    return 0;
}

FlapYoJacks fucked around with this message at 15:35 on Jul 20, 2017

FlapYoJacks
Feb 12, 2009

Arcsech posted:

if you're running embedded without an os you're using c or c++ anyway so c#'s entire tier of language is already out

If you are running embedded without an OS your company/you are poo poo/poor and can't spend an extra dollar on a processor that can run Linux.

FlapYoJacks
Feb 12, 2009

Sapozhnik posted:

Yeah or maybe your power budget isn't as high as tens of milliamps, gently caress face

lol fine, but if you can be > 50mAh there's no reason not to run an actual processor.


CRIP EATIN BREAD posted:

yeah let me run a full OS on something that is basically just a glorified PID controller


Hell yeah, IOT PID controller!

FlapYoJacks
Feb 12, 2009

Chunjee posted:

"I thought staging was production" Just one of those things I hear that makes my head spin and wonder how it ever got this bad.

How could anybody think this? It's TWO DIFFERENT WORDS.

It's as insane as saying "I thought red was blue" or "I thought purple was dog."

:psyduck:

FlapYoJacks
Feb 12, 2009

Nice!

FlapYoJacks
Feb 12, 2009

pram posted:

*generates code in a useless language

So.. Rust?

FlapYoJacks
Feb 12, 2009

I'm the "getting real tired of your bullshit" message.

FlapYoJacks
Feb 12, 2009

MALE SHOEGAZE posted:

I've been using the intellij rust plugin for about a month and I can confirm that it's good. definitely more powerful than the current RLS setups.

only weird thing is that it's kinda fucky about text in a way that can only be experienced. i think it might be a conflict with intellij vim but I'm not turning off vim mode to find out

How about you stop using a text editor from the 70's?

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

feedmegin posted:

I am an embedded guy and I write the gently caress out of some C on the Cortex M0 in TYOOL 2017.

C is ok if there's no user interaction.

  • Locked thread