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
kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

uncurable mlady posted:

i thought i hated selenium but i spent a bit browsing through this custom selenium driver we're using and i think i just hate the guy who wrote it

update: found the part of the code where he wrote a json parser rather than using a library so now I know I hate this fucker

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

uncurable mlady posted:

update: found the part of the code where he wrote a json parser rather than using a library so now I know I hate this fucker

you probably don't hate him enough (though the grammar is pretty simple)

Luigi Thirty
Apr 30, 2006

Emergency confection port.

terrible programmer status: the other guy who started when I did quit so the manager called me into a meeting and said my supervisor says I am doing great at providing janitorial services which shocks me as I definitely have no idea what I'm doing half the time and spend half my shift reading the forums

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
try spendign all your time on here :smugdog: :smugdroid:

Brain Candy
May 18, 2006

Luigi Thirty posted:

terrible programmer status: the other guy who started when I did quit so the manager called me into a meeting and said my supervisor says I am doing great at providing janitorial services which shocks me as I definitely have no idea what I'm doing half the time and spend half my shift reading the forums

hooray, your job evaluation depends on things mostly out of your control

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Brain Candy posted:

hooray, your job evaluation depends on things mostly out of your control

otoh it sounds like his manager has pretty explicit instructions to not let Luigi quit in the near future

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Subjunctive posted:

otoh it sounds like his manager has pretty explicit instructions to not let Luigi quit in the near future

it's fantastic when you get clear signs that this is the case

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Luigi Thirty posted:

terrible programmer status: the other guy who started when I did quit so the manager called me into a meeting and said my supervisor says I am doing great at providing janitorial services which shocks me as I definitely have no idea what I'm doing half the time and spend half my shift reading the forums

welcome to white collar work

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Subjunctive posted:

otoh it sounds like his manager has pretty explicit instructions to not let Luigi quit in the near future

this is basically what i got out of it yes. "please don't quit you'll start doing developer things instead of janitor things soon we swear!"

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I'm pretty sure this is also gonna be my status in a few months. the other guy who got this job with me said in a chat with the ceo that he only sent the resume because he wasn't able to close a job in the usa so welp

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
so

im goofing with go a bit

somebody talk some poo poo about it

fritz
Jul 26, 2003

Jonny 290 posted:

so

im goofing with go a bit

somebody talk some poo poo about it

would have been a great language 30 years ago

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Jonny 290 posted:

so

im goofing with go a bit

somebody talk some poo poo about it

"classes? nah, have you heard of protocolsinterfaces? they're all the rage with the java and the c# kids"

seriously, who in the loving 21st century does a language without implementation inheritance. it's the one thing the message sending and generic function schools of OO could loving agree on, and even the prototypes people.

(NewtonScript > JavaScript)

eschaton fucked around with this message at 07:50 on Mar 6, 2015

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
paging pram

Joe Law
Jun 30, 2008

go is google trying to make c more p-langy. nothing should be made more plangy.

for real though i like the lang, but lack of generics suck and error checking being

code:
ok, err := farts_n_buttz(219)

if err != nil {
...


is awful for a language in 2015

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Jonny 290 posted:

so

im goofing with go a bit

somebody talk some poo poo about it

ive heard its not as good as it could have been but ive never used it. does that help?

cowboy beepboop
Feb 24, 2001

'ST posted:

i have wanted to do a hobby project for a while and i decided recently that i would set up the data model and database first.

i've done a lot of database stuff at home and at work, but i haven't worked at a place that has a really good data setup.

what are some best practices for:
- versioning database code and procedures
- setting up migrations with upgrades and downgrades
- keeping application versions and database versions in sync or at least compatible

thank you.

embrace vertical integration and face to the orm (django)

i really don't think there's a good way to do migrations well in a language agnostic way pls correct if wrong

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

my stepdads beer posted:

embrace vertical integration and face to the orm (django)

i really don't think there's a good way to do migrations well in a language agnostic way pls correct if wrong

The way I'm doing it for one project (haskell, im a bit loco) is to use liquibase standalone for the migration management. Its nice because I can write the migrations as straight SQL with rollbacks, and also have multiple apps with different named migrations that don't collide with one another, yet it's not tied to a particular language.

That said I'm generating a complete schema from my code so that I can be sure everything is set correctly on the real migrations. In my code I'm specifically not using an ORM, just a mapper that let's you write type safe queries that map to data types.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

bucketmouse posted:

crosspost from the bitcoin thread for a completely different sort of terrible programmer

https://github.com/c-darwin/dcoin/search?utf8=%E2%9C%93&q=mongoloid

If only Google had a race service so that we didn't need to hand roll these lists

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Jonny 290 posted:

so

im goofing with go a bit

somebody talk some poo poo about it

The type system is extremely limiting. It loving sucks actually.

http://yager.io/programming/go.html

Otherwise I really like it so it's a shame about the type system. Go channels are awesome and kinda feel like having kafka / rabbit mq built into your language. My bad programming project atm is using kafka and go channels to implement rpcs

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

pointsofdata posted:

The excel api is still utter garbage though, check out msoTriState

good thing now we have EPPlus!

except when you try to do something that it just can't

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Stringent posted:

why do people still leave that kind of poo poo lying around even though the project is in version control?

we've got one at work, I call him the code hoarder.

deleted code is invisible code

sometimes that's fine! sometimes it's not.

wolffenstein
Aug 2, 2002
 
Pork Pro
I converted a subversion repo from no structure to the standard trunk, tags, and branches layout. My co-workers deemed this too confusing and reverted it.

Valeyard
Mar 30, 2012


Grimey Drawer

wolffenstein posted:

I converted a subversion repo from no structure to the standard trunk, tags, and branches layout. My co-workers deemed this too confusing and reverted it.

lol

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
i have a dumb question

my p-lang brain keeps asking what the point of interfaces is if the implementation of any of the interface methods could be wildly different. what's the piece i'm missing?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Blinkz0rz posted:

i have a dumb question

About my p-lang brain keeps asking what the point of interfaces is if the implementation of any of the interface methods could be wildly different. what's the piece i'm missing?

Yeah this is why it's called a protocol in some langs. If it doesn't return the right thing or have the correct side effects it's bad obviously

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Blinkz0rz posted:

i have a dumb question

my p-lang brain keeps asking what the point of interfaces is if the implementation of any of the interface methods could be wildly different. what's the piece i'm missing?

1. it might be wildly different, but when I ask to GetSomeButts() why do I care if your OracleButtGetter is completely different to your WebServiceButtGetter

2. most languages do not have multiple inheritance so interface implementation is one way of achieving something similar.

3. unit testing (or to be precise, mocking) relies on you implementing an interface for the object you want to mock so get used to it. yes this is dumb.

(this list is not exhaustive)

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

~Coxy posted:

1. it might be wildly different, but when I ask to GetSomeButts() why do I care if your OracleButtGetter is completely different to your WebServiceButtGetter

2. most languages do not have multiple inheritance so interface implementation is one way of achieving something similar.

3. unit testing (or to be precise, mocking) relies on you implementing an interface for the object you want to mock so get used to it. yes this is dumb.

(this list is not exhaustive)

would it be fair to say that it's a convention to have the matching interfaces behave mostly the same way?

Workaday Wizard
Oct 23, 2009

by Pragmatica
someone mentioned Kotlin in of these threads

is it good? will i end up with a billion auto generated class files a la Scala?

i see its made by jetbrain so maybe its good, but maybe its bad??? anyone tried it here?

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Blinkz0rz posted:

i have a dumb question

my p-lang brain keeps asking what the point of interfaces is if the implementation of any of the interface methods could be wildly different. what's the piece i'm missing?

think about observers. you don't necessarily know what they need to do with a notification. you just need a standard method for sending it

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

prefect posted:

would it be fair to say that it's a convention to have the matching interfaces behave mostly the same way?

not sure what you mean by that

yes the different implementations should both implement the implementation in a way that makes sense and is not pathological

I'm trying to think of an example from my work offhand...

we have a couple of x86 vs. x84 implementations that implement the same interface?
the same interface also has a "mock" implementation that is a concrete class that returns static objects for testing

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

~Coxy posted:

not sure what you mean by that

yes the different implementations should both implement the implementation in a way that makes sense and is not pathological

I'm trying to think of an example from my work offhand...

we have a couple of x86 vs. x84 implementations that implement the same interface?
the same interface also has a "mock" implementation that is a concrete class that returns static objects for testing

i just mean that you _could_ make the interface implementations do wildly different things, but you don't, because that's not how you're supposed to do it. it's not a rule that's enforced by the compiler; it's a good practice that people generally do

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

~Coxy posted:

3. unit testing (or to be precise, mocking) relies on you implementing an interface for the object you want to mock so get used to it. yes this is dumb.

not any more, thank god

we still have way too many single-implementation interfaces littering our code for precisely this reason, I try and delete them when I can because it really pisses me off

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

DaTroof posted:

think about observers. you don't necessarily know what they need to do with a notification. you just need a standard method for sending it

ya i get why an interface would be important when you don't necessarily know what you're calling but you want to make sure it's called correctly. the thing is, i feel like a lot of that can be done using abstract classes and inheritance too.

i'm sure there's a piece that i'm entirely missing but i am dumb and a very bad programmer

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

~Coxy posted:

1. it might be wildly different, but when I ask to GetSomeButts() why do I care if your OracleButtGetter is completely different to your WebServiceButtGetter

2. most languages do not have multiple inheritance so interface implementation is one way of achieving something similar.

3. unit testing (or to be precise, mocking) relies on you implementing an interface for the object you want to mock so get used to it. yes this is dumb.

(this list is not exhaustive)

so this is cool but it mainly makes me thing that interfaces are useful when implementing an api that will be consumed by others

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Blinkz0rz posted:

so this is cool but it mainly makes me thing that interfaces are useful when implementing an api that will be consumed by others

remember: you will be an "other" in six weeks or so

(this is also why writing maintainable code is important all the time)

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Blinkz0rz posted:

ya i get why an interface would be important when you don't necessarily know what you're calling but you want to make sure it's called correctly. the thing is, i feel like a lot of that can be done using abstract classes and inheritance too.

i'm sure there's a piece that i'm entirely missing but i am dumb and a very bad programmer

yeah a lot of it can be done with abstract classes and inheritance but not all of it. especially in languages with single inheritance. with a typical observer there's no such thing as a default implementation, and you don't want to require observers to be a specific class

if you want default implementations for interfaces you probably want a language that provides mixins (a good thing imo)

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Jabor posted:

not any more, thank god

we still have way too many single-implementation interfaces littering our code for precisely this reason, I try and delete them when I can because it really pisses me off

what do you mean?
this is important

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

prefect posted:

remember: you will be an "other" in six weeks or so

(this is also why writing maintainable code is important all the time)

DaTroof posted:

yeah a lot of it can be done with abstract classes and inheritance but not all of it. especially in languages with single inheritance. with a typical observer there's no such thing as a default implementation, and you don't want to require observers to be a specific class

if you want default implementations for interfaces you probably want a language that provides mixins (a good thing imo)

that makes a lot of sense

since i'm on a roll with dumb questions, has anyone used aws opsworks before? it's got some stupid edge cases with lifecycle events that is making my brain hurt.

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006

Blinkz0rz posted:

ya i get why an interface would be important when you don't necessarily know what you're calling but you want to make sure it's called correctly. the thing is, i feel like a lot of that can be done using abstract classes and inheritance too.

i'm sure there's a piece that i'm entirely missing but i am dumb and a very bad programmer

there are times to use interfaces (most of the time) and there are times to use abstract classes.

so like data structures. a List interface makes way more sense than an abstract List because the underlying storage and plumbing in a list implementation is always going to be wildly different. you might use an array, you might use a linked list, you might use a database table (don't do this) or w/e else. The point is that the List defines how you interact with the underlying data. If someone swaps the list implementation out from under you, it should still be functional even if certain runtime metrics might change (operation performance, memory usage, etc...)

The point is even if you only ever used an ArrayList (and you will only ever mostly use an array list), you still don't care that its an arraylist. you aren't going to be poking at the underlying array. you're still going to be going through all the list interface methods for interaction.

An abstract class is useful for the case where you have common implementation details or resources that you want all subclasses to use and you have common methods that need to be implemented in all subclasses.

ex:
C# code:

public abstract class Vehicle
{
	public void MakeVroomNoises()
	{
		Console.out(VroomNoises);
	}

	public abstract VroomNoises { get; }
}

public class Car extends Vehicle
{
	public VroomNoises { get { return "Vroooom! Vroom vroom vrooooom!" }; }
}

Anything that extends vehicle has to provide an implementation of VroomNoises which the base MakeVroomNoises() method will use.

a more real world example is the Controller class: https://msdn.microsoft.com/en-us/library/system.web.mvc.controller(v=vs.118).aspx . Theres no reason to have an IController interface cause your controller that you create is never going to match that interface. You're going to have your own methods and attributes and all this other stuff that would make an interface pointless. Controllers generally have a single implementation for the underlying plumbing of getting requests in and out of the controller, so again, interface doesn't make sense. In Controllers case there are also loads of context variables that get stuffed into it when its instantiated which makes them available for your extending class at runtime. Things like the current request. There are also common methods (like View() for returning a view) that are extremely common and that you would never implement yourself.

Abstract classes constrain you to a specific implementation which is good when thats what you want, but most of the time thats not what you want.

  • Locked thread