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
ChickenWing
Jul 22, 2010

:v:

The IT thread is all hardware guys and MCSE and CCNA and tier 1 support so I figured I'd make one in our clubhouse for jobs that don't involve looking at things that aren't a computer screen. Talk here about the trials and tribulations of working in any sort of development job. Note that this is distinct from the Coding Horrors thread in that not everything that happens at your dev job is necessarily a horror (just most of it).

Awesome thread about getting your development job thataway

Game dev jobs thread here

ChickenWing fucked around with this message at 16:53 on Nov 25, 2015

Adbot
ADBOT LOVES YOU

ChickenWing
Jul 22, 2010

:v:

I transitioned from co-op employee to FTE and am in the process of swapping out all my crappy co-op handmedowns for actual real hardware. I got one of my 19" 4:3 monitors replaced with a 27" dell widescreen. I don't know what do do with all this space :ohdear: but holy poo poo eclipse is actually useable now!


It's weird having a huge fuckoff monitor and a little babby 19" together though

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

ChickenWing posted:

eclipse is actually useable now!

I don't know how true that is even if you had a 50 inch monitor.

Space Kablooey
May 6, 2009


Ithaqua posted:

I don't know how true that is even if you had a 50 inch monitor.

Yeah, he's forgetting the 4+ GBs of RAM. :cheeky:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
My job is unironically wonderful except that it's way more process heavy than it usually is, despite us wanting to have an agile methodology.

Steve French
Sep 8, 2003

HardDisk posted:

Yeah, he's forgetting the 4+ GBs of RAM. :cheeky:

Wow, a computer with 4 whole gigabytes??

Volmarias posted:

My job is unironically wonderful except that it's way more process heavy than it usually is, despite us wanting to have an agile methodology.

In my experience "process heavy" and "agile methodology" are in no way at odds with each other.

FlapYoJacks
Feb 12, 2009
I love my job, I really do. Everybody get's along, I am 3~ months in and already have the engineering department on board with me becoming lead architect of the rewrite of our product.
That being said; I am just in a stop gap right now of fixing some very old, very lovely code to the point where we can release it and then move on to the new hotness, and it's during that stop gap that I get to see the sheer volume of obscured code that well, 90% of the time works fine and isn't exactly a horror, but it's still not great, well organized, or designed very well.

There are some legitimate coding horrors in the pile of code I have ran upon, but for the most part it's all been fairly OK.

But hey, at least I have put everybody on MS Project. We tried a bunch of other programs (both web based and desktop based) and Project with Project server is the only one that works for everybody.

Before that they had no project management at all! :unsmith:

ChickenWing
Jul 22, 2010

:v:

Steve French posted:

Wow, a computer with 4 whole gigabytes??

I acutally was recently upgraded to a 6-core@3.4ghz Xeon machine with 32GB RAM and a 256GB SSD

That was from a much worse machine with like a 4-core@2ghz Xeon with 4gb RAM. I had to expedite the upgrade because I got moved to a new project and the server application wouldn't start due to lack of free memory.

FlapYoJacks
Feb 12, 2009

ChickenWing posted:

I acutally was recently upgraded to a 6-core@3.4ghz Xeon machine with 32GB RAM and a 256GB SSD

That was from a much worse machine with like a 4-core@2ghz Xeon with 4gb RAM. I had to expedite the upgrade because I got moved to a new project and the server application wouldn't start due to lack of free memory.

What's up Xeon/32GB/SSD buddy. :smug:

I have the exact same setup except a 500gb ssd. :smug:

ChickenWing
Jul 22, 2010

:v:

ratbert90 posted:

What's up Xeon/32GB/SSD buddy. :smug:

I have the exact same setup except a 500gb ssd. :smug:

:smug:


It sucks though because now I can't go get a coffee and come back before my project builds

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Steve French posted:

In my experience "process heavy" and "agile methodology" are in no way at odds with each other.

A couple of our guys went to a scrum master training camp thing last week, so we're going to be breaking out the kool-aid in the near future.

Sounds like a complaint, but I'm honestly hopeful that things will improve - our previous/current state was "we're an agile shop! we have sprints! The manager wants us have long detailed conversations about technical hurdles and feature decisions that involve 20% of the developers in the room during our 'daily stand-ups' which make them take a minimum of 30 minutes!"

The manager was one of the ones who took the training and he seems on board with making some big changes based on what they learned. I'm fine with a lot of processes as long as they enable us to get work done, our problem was our processes were almost pure overhead.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

ratbert90 posted:

What's up Xeon/32GB/SSD buddy. :smug:

I have the exact same setup except a 500gb ssd. :smug:

That's what we had at my last workplace too!

Combined with some custom build system that actually made proper use of CPU cores (unlike the default MSBuild in VS), it reduced some builds from 15+ minutes to less than one. It was kind of amazing.

MrMoo
Sep 14, 2000

ChickenWing posted:

I acutally was recently upgraded to a 6-core@3.4ghz Xeon machine with 32GB RAM and a 256GB SSD

That was from a much worse machine with like a 4-core@2ghz Xeon with 4gb RAM. I had to expedite the upgrade because I got moved to a new project and the server application wouldn't start due to lack of free memory.

You need some pro-tier equipment like this:



Also, every Friday at noon the AV kicks in for a couple of hours and nothing can be done during the run (TREND MICRO OfficeScan).

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

ratbert90 posted:

But hey, at least I have put everybody on MS Project. We tried a bunch of other programs (both web based and desktop based) and Project with Project server is the only one that works for everybody.

Before that they had no project management at all! :unsmith:

It's a shame that Project is the epitome of awful, waterfall project planning. I'd rather have no project management than use Project.

ChickenWing
Jul 22, 2010

:v:


Yeah that's pretty much my old setup. I do not miss it. Not even a little. Especially considering that we are using STS (Spring version of Eclipse), which means that memory leaks will eventually grind the computer to a nigh-standstill over time regardless.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

ChickenWing posted:

I acutally was recently upgraded to a 6-core@3.4ghz Xeon machine with 32GB RAM and a 256GB SSD

That was from a much worse machine with like a 4-core@2ghz Xeon with 4gb RAM. I had to expedite the upgrade because I got moved to a new project and the server application wouldn't start due to lack of free memory.

How quaint, you build your code on your desktop.

:smuggo::hf::yayclod:

Space Kablooey
May 6, 2009


The secretary that handles the punched cards isn't the cloud.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

HardDisk posted:

The secretary that handles the punched cards isn't the cloud.

Not even if they're heavenly?

Virigoth
Apr 28, 2009

Corona rules everything around me
C.R.E.A.M. get the virus
In the ICU y'all......



I got pulled into a team to do AWS Architecting and then my title magically changed to Software Engineer and now I'm expected to dev stuff (and do AWS stuff). Hilarity Ensues?

ChickenWing
Jul 22, 2010

:v:

Volmarias posted:

How quaint, you build your code on your desktop.

:smuggo::hf::yayclod:

people get mad if I commit a broken build :saddowns:

Virigoth
Apr 28, 2009

Corona rules everything around me
C.R.E.A.M. get the virus
In the ICU y'all......



Volmarias posted:

How quaint, you build your code on your desktop.

:smuggo::hf::yayclod:

We had a dev who did a whole branch of work(a couple months) on an instance store AWS EC2 instance. We added Janitor Monkey to that environment, leashed at first, and he ignored the e-mails so the instance got cleaned up and about a quarter of work for one of our services was gone. :vince:

ephphatha
Dec 18, 2009




Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post. Anyone have any material they'd recommend? I don't expect anything to change at my workplace but it might make me feel better to know I'm not the only person who wants to actually use appropriate scoping to the extent the lovely languages I have to code in support it.

Volguus
Mar 3, 2009

Ephphatha posted:

Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post. Anyone have any material they'd recommend? I don't expect anything to change at my workplace but it might make me feel better to know I'm not the only person who wants to actually use appropriate scoping to the extent the lovely languages I have to code in support it.

Well, there are at least few things that happen when you use (not even abuse) global variables (singletons included):
1. Cannot parallelize the code
You maybe can parallelize the code, but you'll need so many mutexes all over the place that there'll be no advantage gained with threads

2. Any change has side-effects
And that will slow down releases, unless you have 110% test coverage unexpected bugs will crop up all over the place. Developers will be effectively afraid to touch anything for hell may break loose

3. Developers (some at least, the good ones) will hate working on that code, they'll leave the company and only the mediocre ones will remain. Unless you have some other extraordinary things to hire and keep good people, the company is doomed (unless they're in such a niche market that they have no competition).

And of course a lot of other issues, but these were the first things that I thought of.

Docjowles
Apr 9, 2009

ChickenWing posted:

:smug:


It sucks though because now I can't go get a coffee and come back before my project builds

RIP this comic

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Ephphatha posted:

Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post. Anyone have any material they'd recommend? I don't expect anything to change at my workplace but it might make me feel better to know I'm not the only person who wants to actually use appropriate scoping to the extent the lovely languages I have to code in support it.

Volguus posted:

Well, there are at least few things that happen when you use (not even abuse) global variables (singletons included):
1. Cannot parallelize the code
You maybe can parallelize the code, but you'll need so many mutexes all over the place that there'll be no advantage gained with threads

2. Any change has side-effects
And that will slow down releases, unless you have 110% test coverage unexpected bugs will crop up all over the place. Developers will be effectively afraid to touch anything for hell may break loose

3. Developers (some at least, the good ones) will hate working on that code, they'll leave the company and only the mediocre ones will remain. Unless you have some other extraordinary things to hire and keep good people, the company is doomed (unless they're in such a niche market that they have no competition).

And of course a lot of other issues, but these were the first things that I thought of.

4. The way a lot of languages implement globals, especially c, it can be very hard to figure out what's a global and where it's from, and where it's defined. Grep is always your best friend when dealing with c code anyway but if whoever wrote it in the first place wasn't really disciplined with naming things and even sometimes if they are (looking at you, linux kernel) those globals can be the thing that makes it required.

5. Requires more effort to dependency inject making testing harder

Cicero
Dec 17, 2003

Jumpjet, melta, jumpjet. Repeat for ten minutes or until victory is assured.

Ephphatha posted:

Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post. Anyone have any material they'd recommend? I don't expect anything to change at my workplace but it might make me feel better to know I'm not the only person who wants to actually use appropriate scoping to the extent the lovely languages I have to code in support it.
With global variables it becomes harder to see how classes and methods relate to each other. For example, usually you can look at a class's instance fields and know that, to do something in any given method, it'll use some of these fields + whatever arguments are specific to that method. But when you use global variables, all that goes out the window, because it could potentially be using data from any random place in your entire application. Makes it harder to follow the 'flow' of code, instead of strictly defined inputs your methods could be grabbing input all over the place.

ChickenWing
Jul 22, 2010

:v:

Oh my god.


I finally *get* unit testing.


Why have I not been doing this my entire life, this is so useful :stonk:

Funking Giblet
Jun 28, 2004

Jiglightful!
Oh hey Slack, outlook, 2x GTalk and Skype!

I get whiplash trying to find out where someone pasted me something.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

ChickenWing posted:

Oh my god.


I finally *get* unit testing.


Why have I not been doing this my entire life, this is so useful :stonk:

Welcome, friend. My your coverage be full and your tests meaningful.

Axiem
Oct 19, 2005

I want to leave my mind blank, but I'm terrified of what will happen if I do

Ephphatha posted:

Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post. Anyone have any material they'd recommend? I don't expect anything to change at my workplace but it might make me feel better to know I'm not the only person who wants to actually use appropriate scoping to the extent the lovely languages I have to code in support it.

Ultimately, you want to be able to reason about code. Code that is easy to reason about is easier and faster to find bugs in, and makes future maintenance work go a lot smoother.

The easiest pieces of code to reason about are idempotent functions. That is, functions that take a set of input and return a set of output, and every time you send the same input in, you get the same output out, without relying on anything except what's in the input set, and without modifying anything outside of its scope. (Side note: these functions are also the easiest to unit test, because each test is given-input-return-output?)

Global variables make this reasoning harder. If a piece of code refers to a global variable, then in order to reason about the code, you need to know everything about where that variable is modified. And if that variable is set in a dozen places that themselves rely on other global variables, you start building an awfully complicated dependency graph in your head just to understand a single function. The more stuff you as a developer have to keep in your head to reason about code, the more likely you're going to get something wrong and accidentally cause a bug.

Never mind what happens when you have a team of people modifying this sort of code, and you're not even aware that one of your colleagues added a new way for that variable to be modified, and in such a way that it breaks the function you're looking at.

Programming is about managing complexity, and global variables add unneeded complexity.



I'm a fan of Rich Hickey's Simple Made Easy, which kind of touches on this sort of thing. Sadly, I can't think of any good resources out there to make the argument that globals are bad, because doesn't everyone already know that? (Obviously not, sadly)

Steve French
Sep 8, 2003

Axiem posted:

The easiest pieces of code to reason about are idempotent functions. That is, functions that take a set of input and return a set of output, and every time you send the same input in, you get the same output out, without relying on anything except what's in the input set, and without modifying anything outside of its scope. (Side note: these functions are also the easiest to unit test, because each test is given-input-return-output?)

This is not quite what idempotent means. Idempotent functions can still have side effects, as long as the outcome is the same if called once or many times. "Set global variable foo to x" is idempotent; "add x to global variable foo" is not.

sarehu
Apr 20, 2007

(call/cc call/cc)
Not quite? More like, not at all.

I should make a list of all the horrible things I did at my last job.

One of them was when I called my coworker a lisptard.

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
Yeah, idempotence is the property that f(x) = f(f(x)); they're talking about pure functions.

We're finally (maybe) getting version control at my job. Still writing code directly on production servers, but, you know, baby steps.

ChickenWing
Jul 22, 2010

:v:

My previous project just got a new contractor to replace one who'd left, and another member of the team introduced him to me so that he knew who to come to if he ran into any snags. In the process I found out that not only do I have a reputation with that team for good work, but I'd implemented more of the codebase (as a co-op student) than the contractor who just left.


:kimchi:

ExcessBLarg!
Sep 1, 2001

Ephphatha posted:

Guess this is the most appropriate place to ask, there was some talk in one of the other threads about some articles detailing why over-using globals in code is an anti-pattern but I've never managed to find anything more comprehensive than a vague blog post.
I don't think use of globals was ever considered a "pattern" as much as a necessity in early programming languages and often reflective of hardware constraints.

For example, on an embedded system there's hardware registers for various things like GPIO pins, a PWM controller, etc. Those are sometimes treated as global variables in C-language code because you only have one (or at least a limited number) of those hardware components anyways.

Also, on some CPUs and microcontrollers, certain memory is "easier" and faster to access than others, like the direct/zero page on a 6502. Frequently-accessed variables will be defined as global and linked to that page as locating them there reduces cycle counts and significantly increases the speed of execution of the overall program.

Using global variables in general purpose, modern application software is generally not a great idea. Most higher-level languages make object-instance variables or some other non-local scoping just as convenient to use as globals, and in C it's long been best practice to use structs for "anything of which you can have more than one".

Folks have already pointed out many reasons why globals are challenging: unclear ownership, access contention, incompatibility with dependency injection frameworks, being limited to "just one of something", etc. What is considered an anti-pattern is to replace global variables with a "god object" that contains fields for everything you'd otherwise make global, without any particular organization or breakdown into smaller objects. Such objects suffer most of the same problems as globals, although you could have more than one instance of them.

As for globals, they do occasionally have their place. Things like "verbosity of log output" for a logging framework might be a global variable, and that's a fairly appropriate usage. I'll also use them in short scripts or other simple programs where defining a more complicated object structure is unnecessary.

Steve French
Sep 8, 2003

sarehu posted:

Not quite? More like, not at all.

Well, okay, yeah. I was giving the benefit of the doubt and assuming he intended to mean not the definition in mathematics and functional programming, where f(f(x)) = f(x), but the frequently used other meaning that an operation is repeatable without further changing the state of a system, and a pure function is trivially idempotent in that sense because it has no side effects.

Axiem
Oct 19, 2005

I want to leave my mind blank, but I'm terrified of what will happen if I do
Actually, misunderstanding on my part. I was under the impression that 'idempotent' and 'pure function' were essentially synonymous. If idempotent functions can have side effects, then it was the wrong word to use; I meant pure functions.

My bad, but now I know!

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Asymmetrikon posted:

We're finally (maybe) getting version control at my job. Still writing code directly on production servers, but, you know, baby steps.

:gonk:

How in the world do the powers that be rationalize not having version control? I can only assume that means that there's no sort of code review process either.

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
Well, source control isn't "fast" enough, you see. Clearly the best way to write code is to make a change to your file, FTP it to the production server, and cross your fingers that nothing breaks. Instant feedback!

Thankfully, my team only has to interact with that stuff peripherally; we have a Kallithea HG server that we store our repos on, and the only trouble is when we need someone on one of the other teams to make a change to a system we interact with.

Also, it's Coldfusion web dev (them, not us; we do Python). I feel that explains a fair bit, frankly.

Adbot
ADBOT LOVES YOU

return0
Apr 11, 2007

Asymmetrikon posted:

Well, source control isn't "fast" enough, you see. Clearly the best way to write code is to make a change to your file, FTP it to the production server, and cross your fingers that nothing breaks. Instant feedback!

Thankfully, my team only has to interact with that stuff peripherally; we have a Kallithea HG server that we store our repos on, and the only trouble is when we need someone on one of the other teams to make a change to a system we interact with.

Also, it's Coldfusion web dev (them, not us; we do Python). I feel that explains a fair bit, frankly.

Even if you wanted this, why not just push to a git repo on the box, or push to like GitHub and have a cron to pull the production branch? Pushing a bunch of diffs to SCM and having it automatically show up on production is like literally easier and less error prone than scp-ing every changed file manually.

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