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
brap
Aug 23, 2004

Grimey Drawer
is git only popular because it was written by ace programmer Linus torvalds

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer

Bloody posted:

I don't know the difference between snack overflow and stack sex change

stack sex change is a collection of question-answer websites on a variety of subjects. snack overflow is the programming specific site.

brap
Aug 23, 2004

Grimey Drawer
what version control do i use if my workflow looks like this:

check out the latest version from master
write some code
merge with any changes that might've happened in master in the meantime
check in my code

in visual studio with tfs it was very simple but i feel like git gives you a bunch of things to gently caress yourself up with. But I have only used the shittiest janky diff tools when merging with git. I'm not sure how to step my game up/improve my software development experience.

I need to be able to at least use git with a minimum level of competence even if I use something else for my own projects. It's too common.

brap
Aug 23, 2004

Grimey Drawer
lol yeah let's go back to synchronous web pages this will be great

brap
Aug 23, 2004

Grimey Drawer
dependency injection just sounds more complex than it is.

brap
Aug 23, 2004

Grimey Drawer
my experience with DI is basically this

code:
public class Bar : IBar { ... }

public class Foo
{
    private IBar bar;

    public Foo() : this(new Bar()) { }

    public Foo(IBar bar)
    {
        this.bar = bar;
    }
}
so that in your unit test you can make a Foo while providing some mocked IBar implementation that gives hardcoded results.

you should avoid DI outside of constructors.

brap
Aug 23, 2004

Grimey Drawer
virtualize windows or bootcamp

brap
Aug 23, 2004

Grimey Drawer
objective-c isn't a very good language, but it's not terrible I guess. the sooner swift matures enough to replace it completely, the better.

be careful with nil, because calling a method on a nil will just give you a nil and not give you any hint that anything is wrong.

also this convention is actually disgusting:
code:
-(id)init {
    if (self = [super init]) {
       // initialize
    }
    return self
}

brap
Aug 23, 2004

Grimey Drawer
so are these command line text editors just a bunch of googling and memorizing every little thing until you know enough to get work done or...?

brap
Aug 23, 2004

Grimey Drawer
seriously though if you pay $70 for sublime text then just lol

brap
Aug 23, 2004

Grimey Drawer
is it normal to write if (foo == true) instead of if (foo) :pwn:

brap
Aug 23, 2004

Grimey Drawer

KARMA! posted:

code:

if(variable == true)
{
    another_variable = true;
}
else
{
    another_variable = false;
}

you're fired.

brap
Aug 23, 2004

Grimey Drawer
lol swift could replace c++ if the only software in the world were cocoa apps

brap
Aug 23, 2004

Grimey Drawer
whyyyy are header files still a thing

brap
Aug 23, 2004

Grimey Drawer
jesus christ debuggers exist you don't have to write in print statements left and right

brap
Aug 23, 2004

Grimey Drawer

MALE SHOEGAZE posted:

lol go doesn't have an exponentiation operator and the standard library only implements float exponentiation

like rolling your own isn't hard but uh...

go is such a worthless language

brap
Aug 23, 2004

Grimey Drawer

LittleFuryThings posted:

Interviewing for a developer job that pays 50K...in D.C.

So I hear this is where the terrible programmers hang out? Maybe I'll be one of you some day.

I have to be honest..that doesn't sound like a very good salary

brap
Aug 23, 2004

Grimey Drawer
good commenting practice is hard to nail down. I think overcommenting is worse than undercommenting because it wastes my time as a reader to slog through and inevitably goes out of date.

I want to know what/why from your comments. if I want to know how I will just knuckle down and read your bad code.

brap
Aug 23, 2004

Grimey Drawer
if you have some poo poo you worked on in more than one sitting and it's not source controlled then welp

brap
Aug 23, 2004

Grimey Drawer
bikeshedding megathread

brap
Aug 23, 2004

Grimey Drawer
swift has a thing called @autoclosure where an argument expression is automatically converted to a function by the compiler.

the ?? operator uses it

foo = foo ?? getDefault()

?? can be executed without evaluating the second expression for the second argument. getDefault() only needs to be evaluated if foo is nil.

brap
Aug 23, 2004

Grimey Drawer
swift doesn't use gc? what does it use, then? I don't have to allocate and free memory manually.

brap
Aug 23, 2004

Grimey Drawer

Marzzle posted:

maybe I am just a teardrop in the ocean of badprogrammers around me?

its this.

brap
Aug 23, 2004

Grimey Drawer
I don't understand it therefore it's bad BLUB PARADOX YOU GUYS

paul graham was right (9/11 was caused by imperative programming)

brap
Aug 23, 2004

Grimey Drawer
no you don't get it if it's not Java or c# it isn't really programming

brap
Aug 23, 2004

Grimey Drawer
writing tests only works if you can actually think of the case that breaks your program. otherwise you write tests for obvious stuff, get :smug: about code coverage and act shocked when it's still broken.

brap
Aug 23, 2004

Grimey Drawer
if you have some boats how would you SELECT the boats WHERE the sails are red or green

brap
Aug 23, 2004

Grimey Drawer
nah bro just stop being a sperg about writing a compiler heh

brap
Aug 23, 2004

Grimey Drawer

rrrrrrrrrrrt posted:

half the point is to be a sperg about it

i know thats why its funny to accuse someone aspiring to write a compiler of being spergy

brap
Aug 23, 2004

Grimey Drawer
I'm fine with 5 + 3. I'm fine with 5.plus(3). I'm fine with (+ 5 3). it doesn't really matter.

brap
Aug 23, 2004

Grimey Drawer
+ to append to a list is fine but functional programmers go too far and start making up >>= and poo poo that is 1. unreadable 2. impossible to google and get documentation for

brap
Aug 23, 2004

Grimey Drawer
someone post that article where a nosql retard learns all about the incredible benefits of relational databases

brap
Aug 23, 2004

Grimey Drawer
+ for string concatenation is fine and only incredibly stupid people have been confused about the effects of it

brap
Aug 23, 2004

Grimey Drawer

Forums Terrorist posted:

StringBuilder concat = new StringBuilder();
String foo = "dick";
String bar = "butt";

System.out.println(concat.Concatenate(foo, bar));

someone put this man out of his misery
also dont use a loving stringbuilder unless you're concatenating dozens or hundreds of strings
the compiler is not stupid and it will generally turn "foo" + "bar" + "baz" into some strcpy call more efficient than instantiating a stringbuilder, etc.

brap
Aug 23, 2004

Grimey Drawer
.net does this poo poo apparently http://stackoverflow.com/questions/20029868/understanding-of-net-internal-stringbuildercache-class-configuration

brap
Aug 23, 2004

Grimey Drawer

Awia posted:

ahhhh i have a interview tomrrow in c#
i assume theyre just gonna ask questions like, "whats oop? whats an interface? whats this keyword mean"
but ive got a coding demo too and thats the scary part

man if you figure out what coding is pls come back and let me know

brap
Aug 23, 2004

Grimey Drawer
what

brap
Aug 23, 2004

Grimey Drawer
is message appropriation a monad?

brap
Aug 23, 2004

Grimey Drawer
i guess the mongodb people were thinking of the word "humongous" when they made the name but somehow didn't realize that the rest of the world would think "mongoloid...wait wtf?"

its like if they called it niggerdb and said "but we were thinking of the word niggardly, like our database is so niggardly with your resources!"

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer

Valeyard posted:

yeah think thats bad, heres Q1

I already know the answers to these, Q1 was a total guess between C and D since I couldnt actually tell what it was trying to parse, but the answer is C

Q2 I said the answer is A because since the patterns its matching against arent similar so the lack of a try isnt going to cause any issues with consumed input, the real answer is in fact A



wow is he completely loving the indentation on the code in order to up the challenge or something

  • Locked thread