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
it is
Aug 19, 2011

by Smythe
Try the get-a-job megathread:

http://forums.somethingawful.com/showthread.php?threadid=3376083

Adbot
ADBOT LOVES YOU

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
re: good programming, I'm very new at this, but I've put a reasonable amount of stock in the idea that always wanting to become a better programmer is the key to getting any good at programming. That and automated testing.

re: bad programming, I was describing my lazy workaround using *args in python functions because I couldn't be bothered to figure out what sort of application my functions will end up having, and someone introduced me to this programming pattern:
code:
def funct(**kwargs):
    val = kwargs.get('value', 'default)
    ...
Mind blown- I may never write a function that requires an argument again.

Pollyanna
Mar 5, 2005

Milk's on them.


Always Be Kwarging.

Volmarias
Dec 31, 2002

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

Cheekio posted:

Mind blown- I may never write a function that requires an argument again.

Don't forget that sometimes limitations are a good thing. Relying on kwargs doesn't make it immediately clear what values your function requires, and some functions realistically only need certain arguments. What use would kwargs be for a square root function?

shrughes
Oct 11, 2008

(call/cc call/cc)

ratbert90 posted:

However it seems like doing embedded Linux poo poo (Bash/C/C++/python/git/svn/${VAR}) isn't necessarily a good resume builder and I would like to make a career move but don't know where to go.

I'm doing C++ work on Linux and if I wanted to move jobs to another C++ on Linux job I don't think I'd have a problem, also I generally do plan on sticking with systems programming stuff, but that might be because I live in a good area (the SF Bay Area). I've never thought that anybody would be interested in whether I have a degree, at this point, now that there's some proof of ability. Companies that are not bad are not going to just not hire non-bad programmers. But then I do have a degree and so might take it for granted.

If you can just switch to Mobile/Web development now, is there reason to think you won't be able to do it later?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Cheekio posted:

re: bad programming, I was describing my lazy workaround using *args in python functions because I couldn't be bothered to figure out what sort of application my functions will end up having, and someone introduced me to this programming pattern:

Why not simply change the function's arguments when you figure out what you want them to be?

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Cheekio posted:

re: bad programming, I was describing my lazy workaround using *args in python functions because I couldn't be bothered to figure out what sort of application my functions will end up having, and someone introduced me to this programming pattern:
code:
def funct(**kwargs):
    val = kwargs.get('value', 'default)
    ...
Mind blown- I may never write a function that requires an argument again.

I assume you are joking about this and I'm just having a sense of humour failure.

I don't often find myself in a situation where it isn't reasonably clear with at most a few moments' reflection what arguments a function I write should be taking. And getting that part right is a pretty important part of getting the function right, since it's what you're presenting to users and asking them to take on board.

pigdog
Apr 23, 2004

by Smythe

Cheekio posted:

re: good programming, I'm very new at this, but I've put a reasonable amount of stock in the idea that always wanting to become a better programmer is the key to getting any good at programming. That and automated testing.

re: bad programming, I was describing my lazy workaround using *args in python functions because I couldn't be bothered to figure out what sort of application my functions will end up having, and someone introduced me to this programming pattern:
code:
def funct(**kwargs):
    val = kwargs.get('value', 'default)
    ...
Mind blown- I may never write a function that requires an argument again.

As it stands that code is a mess, because it's not clear for anybody, including tools, what exactly does the function expect. It would be okay if instead of a random dictionary you would use an actual, concrete value object. If a function has a myriad of arguments, then it's quite likely many of them are semantically related and would make sense as fields on an object of some sort.

PS: It's very useful to first figure out what you want a function to do, then implement it. Particularly if you express what you want as unit tests.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

ratbert90 posted:

Looking at some of the code in this thread has shown me that if you are a good programmer you are ahead of about 95% of other coders.

Indeed.

Programming skill is separate from the syntaxes you know. In the few job interviews I've had, I've found that being honest about your low skills on some area does not necessarily hurt you. Like in my case, I took a course in Qt, but I have used it only in a couple of short (maybe 3 months total) projects, but that didn't stop me from getting a job at a company that specifically wanted a Qt coder. Not that I've used Qt after I was hired, but...

TheresaJayne
Jul 1, 2011

BigRedDot posted:

I'm 40 and I work at a hot new startup, go figure.

Snap, although a little older than 40...

BigRedDot
Mar 6, 2008

TheresaJayne posted:

Snap, although a little older than 40...

I actually fibbed, I am still shy of 40 a few months. Maybe I will get a pink slip for my birthday!

Doctor w-rw-rw-
Jun 24, 2008

AlsoD posted:

Could you be a little more specific with your important advice please?
It's a bit tricky because right now I'm a contract worker waiting to go full time at the end of the year, pending my performance reviews, which will be positive, because my performance has been good, but past coworker(s) didn't tell the truth (or know it, probably) when called up. I was given a second chance, so I'm not going to say anything about the full story just yet,

I will say that I left my previous job because my boss was the scum of the earth that had no problems driving me into a deep depression, and when I was on the verge of doing something bad to myself, he said to deal with it or quit, knowing I had a family to support. Then I dealt with it until I had a panic attack at work, and left quietly to save face for everyone, because other than him, I respected and liked everyone else.

The job before that was a cultural shithole and shady as gently caress, and I really don't want to get into it. But basically, if you jump jobs, expect butthurt in your wake. If you don't get really good references out of it, you're putting yourself a couple of steps behind for your chances of getting jobs at certain companies. And it only takes a few steps to totally disqualify yourself from the big names, since so many people want in.

Cheekio posted:

re: good programming, I'm very new at this, but I've put a reasonable amount of stock in the idea that always wanting to become a better programmer is the key to getting any good at programming. That and automated testing.

re: bad programming, I was describing my lazy workaround using *args in python functions because I couldn't be bothered to figure out what sort of application my functions will end up having, and someone introduced me to this programming pattern:
code:

def funct(**kwargs):
    val = kwargs.get('value', 'default)
    ...

Mind blown- I may never write a function that requires an argument again.
And this is why people use strongly typed languages, because you can refactor the method arguments, among other things. Use a refactoring tool if there is one or use a language that does if you can't be bothered to refactor manually, don't use a dictionary for that in any serious programming. It's a terrible anti pattern for actually knowing what the gently caress is going on in your code as your codebase grows.

Or consider changing your style to write code continuously that you refactor methods out of. I sort of iterate until it's clear something has a clear logical separation, which is pretty often.

In any case, I agree that a good programmer is never good enough, and always trying to get better. Many forget that there's value in slowing down and building a sense for quality and maintainability, rather than just implementing constantly.

Dren
Jan 5, 2001

Pillbug

Doctor w-rw-rw- posted:

It's a bit tricky because right now I'm a contract worker waiting to go full time at the end of the year, pending my performance reviews, which will be positive, because my performance has been good, but past coworker(s) didn't tell the truth (or know it, probably) when called up. I was given a second chance, so I'm not going to say anything about the full story just yet,

I will say that I left my previous job because my boss was the scum of the earth that had no problems driving me into a deep depression, and when I was on the verge of doing something bad to myself, he said to deal with it or quit, knowing I had a family to support. Then I dealt with it until I had a panic attack at work, and left quietly to save face for everyone, because other than him, I respected and liked everyone else.

The job before that was a cultural shithole and shady as gently caress, and I really don't want to get into it. But basically, if you jump jobs, expect butthurt in your wake. If you don't get really good references out of it, you're putting yourself a couple of steps behind for your chances of getting jobs at certain companies. And it only takes a few steps to totally disqualify yourself from the big names, since so many people want in.

No offense man but it sounds like your problems go deeper than switching jobs.

No Safe Word
Feb 26, 2005

Doctor w-rw-rw- posted:

I will say that I left my previous job because my boss was the scum of the earth that had no problems driving me into a deep depression, and when I was on the verge of doing something bad to myself, he said to deal with it or quit, knowing I had a family to support. Then I dealt with it until I had a panic attack at work, and left quietly to save face for everyone, because other than him, I respected and liked everyone else.

The job before that was a cultural shithole and shady as gently caress, and I really don't want to get into it. But basically, if you jump jobs, expect butthurt in your wake. If you don't get really good references out of it, you're putting yourself a couple of steps behind for your chances of getting jobs at certain companies. And it only takes a few steps to totally disqualify yourself from the big names, since so many people want in.

Like Dren said, it sounds like there's more in play here than just your old boss/job.

But, that said, folks in industry are aware that previous employers may/may not suck and won't put all their stock in the references basket, especially if it's not from a known entity. In interviews I've given where references were less than stellar I've allowed the candidates to give their side of the story as well knowing full well to take both sides with a huge grain of salt. In the cases that they line up (eg, there was a mutual misunderstanding, there were new job demands the candidate couldn't meet because of personal reasons like travel/hours, etc.), it can be useful. Otherwise, it's mostly non-informative and doesn't really count as a black mark it just counts as a question mark. I (and most interviewers) can generally gauge your attitude/competency from things other than your resume and your references, and mostly consider them as just a chance for a candidate to present good things and not as roadblocks that need to be overcome.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Doctor w-rw-rw- posted:

And this is why people use strongly typed languages, because you can refactor the method arguments, among other things. Use a refactoring tool if there is one or use a language that does if you can't be bothered to refactor manually, don't use a dictionary for that in any serious programming.

I'm not sure what this means exactly.

For example, you can easily refactor the method arguments in Python, I don't know what that guy was thinking when he used a dict for method arguments.

NtotheTC
Dec 31, 2007


Thermopyle posted:

I'm not sure what this means exactly.

For example, you can easily refactor the method arguments in Python, I don't know what that guy was thinking when he used a dict for method arguments.

Is it not just a similar way of doing:

Python code:
def funct(val='default'):
    print val

funct('not default')     # prints 'not default'
funct()                  # prints 'default'
Which when you compare it to the example above makes it look stupid and verbose, but it does have its place. I've used it for classes when there have been a lot of optional keyword arguments and needed a bit more flexibility.

The other way I've used it is similar to:

Python code:
class SomeClass(AnotherClass):
    def __init__(*args, **kwargs):
        some_var = kwargs.pop('some_var', 'default')
        super(SomeClass, self).__init__(*args, **kwargs)

NtotheTC fucked around with this message at 17:29 on Sep 30, 2013

a lovely poster
Aug 5, 2011

by Pipski

Doctor w-rw-rw- posted:

But basically, if you jump jobs, expect butthurt in your wake. If you don't get really good references out of it, you're putting yourself a couple of steps behind for your chances of getting jobs at certain companies. And it only takes a few steps to totally disqualify yourself from the big names, since so many people want in.

I don't want to continue this derail that much longer but just to clarify my statements earlier. Yes, I job hop a lot. But I'm completely open and honest about it from the get go. I tell people I'm looking for a career and when I find a move that makes sense for my career, I just explain it to my employer. I always give my current employer a chance to match the offer (they never do) and I don't over-commit to employers. I am straight forward in that I tell them the first six months of employment are as much as trial for them as it is for me (obviously in more diplomatic tones). I always leave with good references and make sure to complete my work, give proper notice, and in many cases, freelance for them if they need help during the gap.

As far as age discrimination goes, my current employer has never met me and has no idea how old I am unless they've found out a way outside of asking me. Also, the idea isn't to hop from software engineer to software engineer job. You should have a career path in mind and be making upward moves, not lateral ones. You won't be a 'software engineer' when you're 40 if you move up the job ladder one or two steps every so often for 15 years. I have plenty of friends in their late twenties that are "Architects" and such, hell, I'm a "lead platform developer" and I'm not 30 yet. Five years ago I would have been thrilled to know I would get here by the time I was 40, much less 30.

Put simply, if you're a good programmer and you network well, there's really no reason to "stick it out" with one company for 5+ years unless you really enjoy the work or the people. Having poo poo references at your old employer is a completely different problem that has nothing to do with job hopping. It's hard sometimes to recognize that the situation for developers and the general public is different. Holding on to a career for dear life might make sense if we were looking at 5-10% unemployment in the field but we aren't. We're in huge demand and you're only doing a disservice to not explore the job market on a regular basis.

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.

Suspicious Dish posted:

Why not simply change the function's arguments when you figure out what you want them to be?

I'm paid to be a software engineer, not an architect.

I'm joking, I just think it's a beautifully sloppy-yet-functional coding pattern worth sharing. I don't actually endorse writing code that relies on abusing **kwargs and *args, despite having seen plenty of it.

Doctor w-rw-rw-
Jun 24, 2008

No Safe Word posted:

Like Dren said, it sounds like there's more in play here than just your old boss/job.

But, that said, folks in industry are aware that previous employers may/may not suck and won't put all their stock in the references basket, especially if it's not from a known entity. In interviews I've given where references were less than stellar I've allowed the candidates to give their side of the story as well knowing full well to take both sides with a huge grain of salt. In the cases that they line up (eg, there was a mutual misunderstanding, there were new job demands the candidate couldn't meet because of personal reasons like travel/hours, etc.), it can be useful. Otherwise, it's mostly non-informative and doesn't really count as a black mark it just counts as a question mark. I (and most interviewers) can generally gauge your attitude/competency from things other than your resume and your references, and mostly consider them as just a chance for a candidate to present good things and not as roadblocks that need to be overcome.
Yeah, but some companies will call up your previous companies without telling you anything about who they talked to or what was said, and will put a black mark on you without telling you. I was unlucky enough that my first company's boss made bad technical decisions then blamed them on me, and my second company's boss let me suffer for years after I flagged my burnout as a very real risk and offered multiple constructive alternatives for many months.

Dren posted:

No offense man but it sounds like your problems go deeper than switching jobs.
True, but I'm just saying that switching jobs leaves you vulnerable. If you happen to really want to work somewhere, and if your previous jobs mistreated you, they can really screw you over pretty hard. It's bad to spread the idea that job-hopping is good for your career because if you don't manage it well it can be just the opposite.

Thermopyle posted:

I'm not sure what this means exactly.

For example, you can easily refactor the method arguments in Python, I don't know what that guy was thinking when he used a dict for method arguments.
Having the compiler's assurance that you didn't gently caress up a refactor can be a big help for productivity. It's not so much an argument against languages like Python (which have tooling good enough to do a lot of really useful things) but an argument for languages which offer a helping hand for verifying that something isn't obviously broken at compile-time rather than at runtime. A huge factor in codebase scalability is presenting clear interfaces so that the breakages can be identified before production. TDD is an alternate/complementary solution that works well for the more dynamic languages, but compile-time rather than test-time detection of errors is more suitable for a build-break-build cycle IMO.

Doctor w-rw-rw- fucked around with this message at 19:54 on Sep 30, 2013

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Doctor w-rw-rw- posted:

Having the compiler's assurance that you didn't gently caress up a refactor can be a big help for productivity. It's not so much an argument against languages like Python (which have tooling good enough to do a lot of really useful things) but an argument for languages which offer a helping hand for verifying that something isn't obviously broken at compile-time rather than at runtime. A huge factor in codebase scalability is presenting clear interfaces so that the breakages can be identified before production. TDD is an alternate/complementary solution that works well for the more dynamic languages, but compile-time rather than test-time detection of errors is more suitable for a build-break-build cycle IMO.

Yeah, you're right of course. I don't know what I was thinking with my post.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

NtotheTC posted:

Python code:
class SomeClass(AnotherClass):
    def __init__(*args, **kwargs):
        some_var = kwargs.pop('some_var', 'default')
        super(SomeClass, self).__init__(*args, **kwargs)

??? Why would you do it this way instead of just using default argument values? (Also you missed out self.)

Python code:
class SomeClass(AnotherClass):
    def __init__(self, *args, some_var = 'default', **kwargs):
        super(SomeClass, self).__init__(*args, **kwargs)
[/quote]

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

NtotheTC posted:

Is it not just a similar way of doing:

I meant, that I was confused as to why you would use **kwargs in an effort to avoid having to refactor method signatures, when Python tools can already refactor method signatures.

NtotheTC
Dec 31, 2007


Hammerite posted:

??? Why would you do it this way instead of just using default argument values? (Also you missed out self.)

Like I said, it's a stylistic thing. With a lot of kwargs I personally think it starts to look less readable the way you did it. And yes I did forget self.

VVV Yes that works too. As an aside, would it be too highbrow for goons if I suggested we all use Lewis Caroll references in our code now instead of foo bar or fart butts? I'm a huge fan of the mome raths.

Python code:
class Wabe(object):
    def __init__(self, *slithy_toves, brillig=True, **kwargs):
        if brillig:
            for slithy_tove in slithy_toves:
                slithy_tove.gyre()
                slithy_tove.gimbal()

NtotheTC fucked around with this message at 22:05 on Sep 30, 2013

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

NtotheTC posted:

Like I said, it's a stylistic thing. With a lot of kwargs I personally think it starts to look less readable the way you did it. And yes I did forget self.

There are ways to make it more readable. There's nothing to say that everything has to be on one line, for example.

Python code:
class myclass:
    def myfunction (
        self,
        widget1, widget2,
        *extra_widgets,
        format = 'text', borogroves = 'mimsy', mome_raths = 'outgrabe',
        **kwargs
    ):
        ...
There is a minor issue with this, which is that Python's built-in help pretty printer just kind of jams everything onto one line, but that's not really a big deal.

SurgicalOntologist
Jun 17, 2004

Coding horror: storing important information in variable names. This is the #1 problem with other people's code in my field (psychology). Ran into this today:

code:
subjects = 1:20;
condition = 1:2;
left_right = 0:1;
blocks = 1:3;

for s = subjects
   for c = condition
      for lr = left_right
         for b = blocks
            var = ['s' int2str(s) 'c' int2str(c) 'l' int2str(lr) 'b' int2str(b)];
         end
      end
   end
end

% Proceed to do all the data analysis with 'eval' statements to access the variable whose name is stored in 'var'
"Hey SurgicalOntologist, you're a programmer, is there an easier way to do this kind of thing?"
:suicide:

E: yes, yes, Matlab is the real horror, I know.

E2: Also need to vent about being the 'token programmer' on a project. You really need the output to include confidence report and absolute value of confidence report? Is abs_confidence so much easier to type than abs(confidence)? And you need separate variables with counts of incorrect and correct responses for each condition? What's wrong with sum(response==answer & condition==2)? I have to do all combinations you might possibly need? :suicide:

SurgicalOntologist fucked around with this message at 00:27 on Oct 1, 2013

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
pre:
var syntax ={
    ...
    grammer : function (input,value){
       ...
    },
    ...
}
Yup, you definitely know better.

Also, maybe you shouldn't have 15 thousand[!] uncommitted files in your repository with a last committed date of April 5th. But then again, what do I know? Like you said, I obviously don't know the first thing about programming.

QuarkJets
Sep 8, 2008

SurgicalOntologist posted:

E: yes, yes, Matlab is the real horror, I know.

This can't be said often enough

Pollyanna
Mar 5, 2005

Milk's on them.


I like MATLAB (in so much as someone can like it) and I still agree.

Don Mega
Nov 26, 2005
Does anyone have a link to the Enterpise Java version of Hello World posted here a while ago? I cannot find a link to it :(

astr0man
Feb 21, 2007

hollyeo deuroga
Is this what you're thinking of? It's FizzBuzz not HelloWorld.

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

Don Mega
Nov 26, 2005
Yeah that was what I was thinking of. Thanks!

Workaday Wizard
Oct 23, 2009

by Pragmatica
Just in case you don't know, that example was a joke.
The claim that Java is too verbose is just a nerdy exaggeration. Don't base your career decisions on it.
Java has excellent IDEs, toolchains, standard libraries, and 3rd party libraries.
Java is good. Learn Java. Use Java. Love Java.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory

Workaday Wizard
Oct 23, 2009

by Pragmatica

So?

You don't find anything like this in your flavour-of-the-month language because they haven't been used in all the places Java been.
That's all.

return0
Apr 11, 2007
Vanilla java is a joke these days man, surely nobody is making new java software outside of phone apps and maintenance.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Shinku ABOOKEN posted:

So?

You don't find anything like this in your flavour-of-the-month language because they haven't been used in all the places Java been.
That's all.

If you want to post ironically, please post in the 'pos.

libcxx
Mar 15, 2013
thread_local post<shit> shit_post("lol if u");
Ugh this fast language with excellent libraries and tools is such a joke.

Workaday Wizard
Oct 23, 2009

by Pragmatica
Whatever.

Point is: Learn Java even if you are 100% sure you won't write a single byte in it.

JawnV6
Jul 4, 2004

So hot ...
Yeah, cramming a bunch of boilerplate in your face is still totally necessary in 2013. Those simple languages? The ones built for learning? Pfah, they lack xml RPC mechanisms and will leave you high and dry.

Adbot
ADBOT LOVES YOU

libcxx
Mar 15, 2013
thread_local post<shit> shit_post("lol if u");
I can't stand all this autogenerated boilerplate! *writes a literal novel in cucumber*

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