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
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

A relatively-major service at work uses Mongo, to the point of upstreaming major changes. It's sort of hard to keep a straight face when they're talking about scaling problems.

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

JawnV6 posted:

The person on the other side of the negotiation is not thinking in these terms. They will take advantage of this mindset and pay less than they can afford for your role.

I've been on "the other side" most often in these negotiations, having signed probably 300 job offers. If I showed up at candidate review and said "we can make him a lower offer because she's not being aggressive in her negotiations", I would be in serious poo poo. Not that I've ever negotiated that way from the employer side anyway, really. At Mozilla there were literally dozens of times that I offered our standard amount for the role even though it exceeded the person's stated salary expectations (which I think were often lowballed a bit because they knew we were non-profit and were fans of the work), and I would have given my directors poo poo if they hadn't behaved the same way.

Work for nice people, you'll live longer.

ObHorror: all the code I wrote today, which in a few weeks will probably risk the lives of a billion people or something.

ExcessBLarg!
Sep 1, 2001

Subjunctive posted:

A relatively-major service at work uses Mongo, to the point of upstreaming major changes.
Doesn't Mongo have that fun AGPL license where you kinda have to do that anyways?

Volmarias
Dec 31, 2002

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

Edit: I just realized that I was making a "last word" derail, so I'm going to just edit everything out. Suffice to say there's more than it sounds like.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ExcessBLarg! posted:

Doesn't Mongo have that fun AGPL license where you kinda have to do that anyways?

I think most of our stuff was in the area of plugins/drivers/whatnot, so outside the scope of the mongod AGPL, but possibly. I try to not look directly at it.

Oldeba
Jun 5, 2004
self-sufficience please
I am converting *this* html content to *that* format. There are nine tiers of nested tables. There are no id or class attributes.

towerWrapper = Browser.Document.GetElementsByTagName("table")[4];
for (int i = 0; i < TowerCount; i++) {
towerTable = towerWrapper.FirstChild.FirstChild.Children[i].FirstChild;
floorTable = towerTable.FirstChild.Children[1].FirstChild.FirstChild.FirstChild.FirstChild.Children[1].FirstChild;
(more lovely code)
}

I feel dirty. This is the worst code I've ever written. Maybe I'm a horrible idiot programmer and I'm just realizing it now. I'm scared.

Oldeba fucked around with this message at 07:08 on Aug 21, 2014

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

ExcessBLarg! posted:

Doesn't Mongo have that fun AGPL license where you kinda have to do that anyways?

Only if the server is public-facing. AGPL just extends the idea that you have to give the source to the user to cover things where the user communicates with it over a network rather than running the program directly. If you're using one of those dumb JS MVC frameworks that has to be able to talk directly to a mongo server then you'd have to distribute the source, but I somewhat doubt that's anywhere close to what they're doing.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Plorkyeran posted:

one of those dumb JS MVC frameworks that has to be able to talk directly to a mongo server

gently caress me, thanks for reminding me that people do this.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ultramiraculous posted:

gently caress me, thanks for reminding me that people do this.

"terrible idea as a service"

het
Nov 14, 2002

A dark black past
is my most valued
possession

Oldeba posted:

I am converting *this* html content to *that* format. There are nine tiers of nested tables. There are no id or class attributes.

code:
towerWrapper = Browser.Document.GetElementsByTagName("table")[4];
for (int i = 0; i < TowerCount; i++) {
    towerTable = towerWrapper.FirstChild.FirstChild.Children[i].FirstChild;
    floorTable = towerTable.FirstChild.Children[1].FirstChild.FirstChild.FirstChild.FirstChild.Children[1].FirstChild;
}
I feel dirty. This is the worst code I've ever written. Maybe I'm a horrible idiot programmer and I'm just realizing it now. I'm scared.
I'm probably missing some Javascript convention, but isn't this just overwriting towerTable and floorTable each time? Why do "towerWrapper.FirstChild.FirstChild.Children[i].FirstChild" while looping instead of just "towerWrapper.FirstChild.FirstChild.Children[TowerCount].FirstChild"?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Subjunctive posted:

"terrible idea as a service"

Reminds me of Super Meat Boy's direct to Database client access. Clients don't access back-end databases god dangit!

Jewel
May 2, 2009

Maluco Marinero posted:

Reminds me of Super Meat Boy's direct to Database client access. Clients don't access back-end databases god dangit!

I know about this but I've never studied into the design of these kind of systems so I'm curious; what IS the correct way to do what super meat boy does with custom levels and scoreboards?

Oldeba
Jun 5, 2004
self-sufficience please

het posted:

I'm probably missing some Javascript convention, but isn't this just overwriting towerTable and floorTable each time? Why do "towerWrapper.FirstChild.FirstChild.Children[i].FirstChild" while looping instead of just "towerWrapper.FirstChild.FirstChild.Children[TowerCount].FirstChild"?

For brevity I omitted the lines of code in that for loop that use those variables. There's a nested for loop where I parse each tr in FloorTable -> tbody.children, reading in the number of td's in that tr, use the inner td's to create a's and imgs from the old data, then end that loop and move on the the next TowerTable.

I just wanted to hilite the pain of not having an id to latch onto in DOM.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Jewel posted:

I know about this but I've never studied into the design of these kind of systems so I'm curious; what IS the correct way to do what super meat boy does with custom levels and scoreboards?

You have a trustworthy service that the clients talk to, that also talks to the database.

By having a well-defined and minimal interface between your (trusted) server and the (untrusted) clients, it's far easier to secure things so that clients can't do anything bad, and you also gain the ability to change how your service works internally without having to push an update to every single client in order to do that.

ErIog
Jul 11, 2001

:nsacloud:

Jewel posted:

I know about this but I've never studied into the design of these kind of systems so I'm curious; what IS the correct way to do what super meat boy does with custom levels and scoreboards?

You write some kind of server side interface for the game to interact with via HTTP GET/POST requests the same as any other kind of web service.

Here's an article that outlines the general structure of a rudimentary online leaderboard with rudimentary security measures in place: http://brightside-games.com/?p=125

I really like Tommy Refenes as a person, but he seems to lack a basic sense of diligence when it comes to programming. Here's some choice quotes:

Tommy Refenes posted:

The biggest problem we had when making Super Meat Boy was also the stupidest. The game has a few bugs, but there’s one where you had to pull the memory card out of the Xbox360 just as you were saving. And literally, you had to do it exactly as you pull the card out. I had to make it say “DON’T DO THAT IT WON’T SAVE!” just so it wouldn’t happen to people. Why the gently caress would you be stupid enough to do something like that to your Xbox? Who in their right mind would actually do something like that and not expect bugs? I had to fix around 100+ of those bugs for each time it was saving.

http://www.cgmagonline.com/interviews/all-hail-the-meat-boy/

Tommy Refenes posted:

Due to an unfixable bug in the Mac version, we don't support 360 controllers on Mac. I do apologize for this. The bug is unfixable because I can't again risk killing everyones game with another update. The game incorrectly assumes that no more than 12 buttons will ever be on a controller. This is mainly true, however Mac controller drivers map the JoyHAT as 4 different buttons it seems, which makes it so you can't map B X and Y properly. This also messes up the start and select buttons. It was a mistake on my part. The bug could be fixed, however there is a significant risk that fixing it will break other things to the point where its unplayable with the keyboard which we would then have to go in and fix and start a whole new cycle of updating the game / breaking something in an update, rinse, repeat. I am sorry about this, do know that it is fixed in our new engine for game 2. Also, non Xbox 360 controllers appear to work fine. Joy2Key esque programs may remedy this issue, but it has not been tested by me. Again, we are sorry about this.

http://supermeatboy.com/115/Things_every_Mac_user_should_know___/

ErIog fucked around with this message at 07:54 on Aug 21, 2014

Jewel
May 2, 2009

Yeah okay I get it now. I was thinking it was a middleman but I wasn't sure. I already knew about score hacking prevention by sending the game timeline and rewinding so that's good to know too.

canis minor
May 4, 2011

Oldeba posted:

I am converting *this* html content to *that* format. There are nine tiers of nested tables. There are no id or class attributes.

towerWrapper = Browser.Document.GetElementsByTagName("table")[4];
for (int i = 0; i < TowerCount; i++) {
towerTable = towerWrapper.FirstChild.FirstChild.Children[i].FirstChild;
floorTable = towerTable.FirstChild.Children[1].FirstChild.FirstChild.FirstChild.FirstChild.Children[1].FirstChild;
(more lovely code)
}

I feel dirty. This is the worst code I've ever written. Maybe I'm a horrible idiot programmer and I'm just realizing it now. I'm scared.

So that you know, this shouldn't work - JS is case sensitive, so - FirstChild should be firstChild, Children should be children, etc. (it looks like JS, it smells like JS...)

To get rid of that firstChild.firstChild you can use element.querySelectorAll. Overall - traversing the DOM like that imho isn't the way to go.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Subjunctive posted:

I've been on "the other side" most often in these negotiations, having signed probably 300 job offers. If I showed up at candidate review and said "we can make him a lower offer because she's not being aggressive in her negotiations", I would be in serious poo poo.

You're turning this into a false dichotomy, or at least not refuting what was said at all. For those candidates that you made an offer, how many would you have rejected if they negotiated it up a bit?

I'm guessing it won't have been much.

Which means that you "pay (them) less than (you) can afford for (their) role" and "you're taking advantage of this mindset".

There's people who negotiate and there's sheep.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

ErIog posted:

You write some kind of server side interface for the game to interact with via HTTP GET/POST requests the same as any other kind of web service.

Here's an article that outlines the general structure of a rudimentary online leaderboard with rudimentary security measures in place: http://brightside-games.com/?p=125

I really like Tommy Refenes as a person, but he seems to lack a basic sense of diligence when it comes to programming. Here's some choice quotes:

Haha wow.

quote:

Tommy: I know. It’s as though they’re just searching for bugs any way they can. It’s extremely annoying.

I'm shocked, shocked that people paid to find bugs are actually doing what they're being paid to do.

quote:

The bug could be fixed, however there is a significant risk that fixing it will break other things to the point where its unplayable with the keyboard which we would then have to go in and fix and start a whole new cycle of updating the game / breaking something in an update

God forbid you actually, you know, test your loving code before shipping it to customers. He makes it sound like the worst thing in the world.

ErIog
Jul 11, 2001

:nsacloud:
I am somewhat sympathetic to him because I remember having that attitude when I first started programming. However, the fact that a guy who has shipped a console game reminds me of myself dicking around with C when I was 12 does make me pause a bit.

The choice bit is that he posted that poo poo about not being able to fix controller support in the Mac version after also saying this in a Gamasutra Postmortem:

Tommy Refenes posted:

One huge reason is control. I'm sort of a control freak when it comes to code; I like to understand everything that's going on in my codebase. That way, if something breaks, I know exactly where and how to fix it. Also, I got into games to program games, not to script them. I enjoy all aspects of game programming, from the engine to the gameplay. Since we're indie and can do what we want, and since I had the skill set, I simply enjoyed doing the engine.

Development of Super Meat Boy took 18 months from the first line of engine code I wrote to the last line of error messaging code I wrote before final submission to XBLA certification. Personally, I think that's record time for a game made by two guys with as much content as it has. I honestly feel the reason we were able to do this is because I was so involved with the code. When a bug would pop up, I could track it down immediately no matter how low to the hardware it was.

http://www.gamasutra.com/view/feature/134717/postmortem_team_meats_super_meat_.php

Gee, so bugs are so easy to fix because you Rambo'ed your own engine, but fixing this controller bug that assumes the layout of all past and future controllers that will ever exist is beyond you.

ErIog fucked around with this message at 09:34 on Aug 21, 2014

Oldeba
Jun 5, 2004
self-sufficience please

eithedog posted:

So that you know, this shouldn't work - JS is case sensitive, so - FirstChild should be firstChild, Children should be children, etc. (it looks like JS, it smells like JS...)

To get rid of that firstChild.firstChild you can use element.querySelectorAll. Overall - traversing the DOM like that imho isn't the way to go.

I appreciate the advice. The code is C#, not Javascript, and I'm using asp.net's implementation of DOM (where .FirstChild and .children[0] are not the same).

qntm
Jun 17, 2009
Is the Super Meat Boy code available anywhere? I bet there's some sights to see.

Hammerite
Mar 9, 2007

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

ErIog posted:

You write some kind of server side interface for the game to interact with via HTTP GET/POST requests the same as any other kind of web service.

Here's an article that outlines the general structure of a rudimentary online leaderboard with rudimentary security measures in place: http://brightside-games.com/?p=125

I really like Tommy Refenes as a person, but he seems to lack a basic sense of diligence when it comes to programming. Here's some choice quotes:

Is that the same guy who when whichever goon it was pointed out that they could edit the high scores database, just kept sending dismissive tweets saying "look I know what I'm doing, trust me, it's fine" right up until the point at which it became obvious it wasn't fine

1337JiveTurkey
Feb 17, 2005

qntm posted:

Is the Super Meat Boy code available anywhere? I bet there's some sights to see.

Just figure out what source repository whatever system they use to patch connects to. :v:

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Skuto posted:

You're turning this into a false dichotomy, or at least not refuting what was said at all. For those candidates that you made an offer, how many would you have rejected if they negotiated it up a bit?

I understand your point here, but I don't entirely agree. I'm going to bow out of the derail, though, before it spirals farther. Thanks.

canis minor
May 4, 2011

Oldeba posted:

I appreciate the advice. The code is C#, not Javascript, and I'm using asp.net's implementation of DOM (where .FirstChild and .children[0] are not the same).

Oh, sorry about that then. It's weird though that it wouldn't support other DOM traversal methods - still .FirstChild != .children[0] is strange in its own merit.

JawnV6
Jul 4, 2004

So hot ...

Subjunctive posted:

Work for nice people, you'll live longer.

I am not talking about your personal situation. I am not talking about my personal situation. I am talking about the general advice being proffered which should take into account that the entire discipline is not captured in our personal situations.

It's really odd that everyone assumes my personal situation must be poo poo and climb up on their high horse whenever I try to speak about a less than perfect situation existing somewhere for someone.

e: lol each FB employee is $1M in revenue, so im thinking $5k on each offer probably isn't breaking the bank

JawnV6 fucked around with this message at 20:33 on Aug 21, 2014

ExcessBLarg!
Sep 1, 2001

Plorkyeran posted:

If you're using one of those dumb JS MVC frameworks that has to be able to talk directly to a mongo server then you'd have to distribute the source,
Oh that explains it. The AGPL kind of makes sense for web server code since the user interacts "directly" with the web server. I didn't understand the utility of it for a database since I'd never intentionally expose my database directly to clients/public. But I guess that's a thing that people do, huh.

ErIog
Jul 11, 2001

:nsacloud:

1337JiveTurkey posted:

Just figure out what source repository whatever system they use to patch connects to. :v:

This requires some kind of source control to have been used.

evilentity
Jun 25, 2010
What do you guys think about Unity opening up a bit? Will it be enough to stop or even delay UE4?

E: welp how did this end up here?

evilentity fucked around with this message at 21:37 on Aug 21, 2014

Strong Sauce
Jul 2, 2003

You know I am not really your father.





http://forums.somethingawful.com/showthread.php?noseen=0&threadid=2803713&pagenumber=258#post398884189

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Oldeba posted:

I appreciate the advice. The code is C#, not Javascript, and I'm using asp.net's implementation of DOM (where .FirstChild and .children[0] are not the same).

Can you use XPath queries? They're so much easier than property chains (in the same way that regular expressions are so much easier than 10s of lines of loving with indexOf, slice, etc.)

astr0man
Feb 21, 2007

hollyeo deuroga

I forgot how quickly that deteriorated into rape chat

No Safe Word
Feb 26, 2005

astr0man posted:

I forgot how quickly that deteriorated into rape chat

Yeah but then it reminded me that the manga guide to databases exists and all was well.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





astr0man posted:

I forgot how quickly that deteriorated into rape chat

I was thinking you were wrong since I didn't notice it but then I reread and found it on the same page. drat.

ATM Machine
Aug 20, 2007

I paid $5 for this

No Safe Word posted:

Yeah but then it reminded me that the manga guide to databases exists and all was well.

And now I know that this is a real book. I kinda want a copy of it just to put it between my other books.

TodPunk
Feb 9, 2013

What do you mean, "TRON isn't a documentary?"
A while ago I joined a company to essentially take them out of "everything programmed by an 18-year-old hipster" and refactor or rewrite all the bits to arrive somewhere closer to "well, we thought about things, designed them from what we knew and we think maybe we'll have a thing that's maintainable for some reasonable amount of time." That's all well and good, so I expected some green approaches or whatnot. I get added to the github org the first day, clone the main repo, and (this is a PHP codebase written by one person over 9 months, mind you):

code:
/
/v3.0/
/v4.0/
/v5.0/
/v6.0/
/v7.0/
/v8.0/
/v9.0/
/v10.0/
/v11.0/
/v12.0/
/v13.0/
/controller.php
/endpoint.php
/init.php
/robots.php
/run.php
/README.md
The README.md was easily the largest file of those in the root.

Look Around You
Jan 19, 2009

TodPunk posted:

A while ago I joined a company to essentially take them out of "everything programmed by an 18-year-old hipster" and refactor or rewrite all the bits to arrive somewhere closer to "well, we thought about things, designed them from what we knew and we think maybe we'll have a thing that's maintainable for some reasonable amount of time." That's all well and good, so I expected some green approaches or whatnot. I get added to the github org the first day, clone the main repo, and (this is a PHP codebase written by one person over 9 months, mind you):

code:
/
/v3.0/
/v4.0/
/v5.0/
/v6.0/
/v7.0/
/v8.0/
/v9.0/
/v10.0/
/v11.0/
/v12.0/
/v13.0/
/controller.php
/endpoint.php
/init.php
/robots.php
/run.php
/README.md
The README.md was easily the largest file of those in the root.

He's not a very good hipster if he's writing PHP.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
IMO bad programmers arent good enough to write horrifying code. My code will never be anything more than an annoyance.

Adbot
ADBOT LOVES YOU

darkpool
Aug 4, 2014

There usually aren't enough game development horrors in here, Unity is like the PHP of games.

http://www.reddit.com/r/Unity3D/comments/2e9vlg/unity_serialization_is_truly_fubar/

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