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
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

darthbob88 posted:

Last page, but while English may have been Conrad's third language, it was the language of his secret choice, of his heart, of his very dreams. How many imported Indian dorks can say the same?



so we need otakus

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
lol he sounds like an otherkin

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

so we need otakus

we really don't

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

ImmovableSquid posted:

Right now I have some php code [...]
I feel like my code is kinda clunky though

hey i think i found your problem

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
stop trying to make php elegant, it's like wrestling a pig

Blinkz0rz
May 27, 2001

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

Dessert Rose posted:

stop trying to make php elegant, it's like wrestling a pig

nah it's doable, his code is just really lovely

Soricidus
Oct 21, 2010
freedom-hating statist shill

Blinkz0rz posted:

nah it's doable, his code is just really lovely

so is wrestling a pig. doable != worthwhile.

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme
hi(g_pTerrible_programmers);

Put yourself in my life for a moment: Work is me doing nasty embedded systems bitch work on a tight schedule to make rich people expensive toys, it puts the fear in me that I'll never move past insignificant work with slow microcontrollers.

One day I think: man, wouldn't it be cool to work remotely, travel and live an fulfilling life? Maybe if airport security didn't think my projectos are bombas this could work nicely. Maybe I should look into other tech sub-fields. It's not too unfamiliar that it's scary. I am going to become an interesting person. This will be great. Excitement builds inside me. YOSPOS, kill my dumb dreams.

I work for the only tech company in town and I walk to work somewhere in a nicer part of the (extended) SF bay area. Rent is cheap, house is nice, I live downtown, salary is not good for SF but decent here but my work is meaningless garbage. With these (super) first word problems and no internal direction, what would Y'ALLSPOS do?

cowboy beepboop
Feb 24, 2001

Dessert Rose posted:

stop trying to make php elegant, it's like wrestling a pig

symfony is so awful it's like someone saw Spring and thought I want that but with more opaque xml configuration options but also in a terrible bullshit language. for a framework it's missing a bunch of pretty normal stuff too. the user sections is great it's like "step one add this one weird trick to your security.xml. now write your own user class! wow we're all done here". cool framework guys.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Dessert Rose posted:

stop trying to make php elegant, it's like wrestling a pig

fun and highly erotic? that doesn't sound like php

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

ImmovableSquid posted:

Right now I have some php code that looks like this:

code:
$imageArray = array("alpha" => 0, "beta" => 0, "gamma" => 0, "delta" => 0, "epsilon" => 0, "zeta" => 0,  "eta" => 0,  "theta" => 0,  "iota" => 0);

$q = 'select choice from table where email="email@email.com"';
$r = mysql_query($q);
while($row = mysql_fetch_assoc($r)) {
  $imageArray[$row["choice"]] = in_array($row["choice"], $imageArray);
}
This is for a website with locked content. Unlocking it makes a row in the table. Further down in the website this array is used to determine what to display.

I feel like my code is kinda clunky though. Like I should be able to create the array inside of my while loop. But since I won't have rows for content that isn't unlocked the only way to do that would be to have the information on what is unlocked in one row instead. Am I missing something obvious?

code:
// dont use anything but pdo. thanks
code:
 // also then you can do a fetchAll() and not that janky-rear end while($poop = $fromabutt) 1970's c style horror 
$yourwelcome = $pdo_statement->fetch_all(PDO::FETCH_ASSOC);

Bloody
Mar 3, 2013

meatpotato posted:

hi(g_pTerrible_programmers);

Put yourself in my life for a moment: Work is me doing nasty embedded systems bitch work on a tight schedule to make rich people expensive toys, it puts the fear in me that I'll never move past insignificant work with slow microcontrollers.

One day I think: man, wouldn't it be cool to work remotely, travel and live an fulfilling life? Maybe if airport security didn't think my projectos are bombas this could work nicely. Maybe I should look into other tech sub-fields. It's not too unfamiliar that it's scary. I am going to become an interesting person. This will be great. Excitement builds inside me. YOSPOS, kill my dumb dreams.

I work for the only tech company in town and I walk to work somewhere in a nicer part of the (extended) SF bay area. Rent is cheap, house is nice, I live downtown, salary is not good for SF but decent here but my work is meaningless garbage. With these (super) first word problems and no internal direction, what would Y'ALLSPOS do?

I would get a MBA

gonadic io
Feb 16, 2011

>>=
Volunteer to teach those skills at the weekend. Was it Sagebrush who helped out at a robotics club/competition thing for example?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
lol we found out at the last moment that our client, a government agency, can only use IE8 and all the nice bells and whistles that they asked for can't actually be used and are breaking the site for them

so loving glad i'm out of here in 2 weeks

KidDynamite
Feb 11, 2005

Blinkz0rz posted:

lol we found out at the last moment that our client, a government agency, can only use IE8 and all the nice bells and whistles that they asked for can't actually be used and are breaking the site for them

so loving glad i'm out of here in 2 weeks

the unforeseen we "have" to use an ancient soon to be unsupported browser business req
did none of the stakeholders try to look at the site even once on their own?

Blinkz0rz
May 27, 2001

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

KidDynamite posted:

the unforeseen we "have" to use an ancient soon to be unsupported browser business req
did none of the stakeholders try to look at the site even once on their own?

hahahahahaha

you think any of the stakeholders give a poo poo until the very last second?

also project management is loving woeful. it's one of the reasons i'm leaving.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
it helps that i'm in complete "idgaf" mode

this whole thing is laughable and i can't wait to walk away from this dumpster fire with both guns blazing

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme

Bloody posted:

I would get a MBA

Are MBAs the STEM equivalent of a Library Science degree for the humanities, or is the knowledge actually practical? I've heard MBAs are all about making connections while in the program.

gonadic io posted:

Volunteer to teach those skills at the weekend. Was it Sagebrush who helped out at a robotics club/competition thing for example?

I like this idea, my weekends are mostly empty and this could make me feel good.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Blinkz0rz posted:

lol we found out at the last moment that our client, a government agency, can only use IE8 and all the nice bells and whistles that they asked for can't actually be used and are breaking the site for them

so loving glad i'm out of here in 2 weeks

ayy lmao

Shaggar
Apr 26, 2006

Blinkz0rz posted:

lol we found out at the last moment that our client, a government agency, can only use IE8 and all the nice bells and whistles that they asked for can't actually be used and are breaking the site for them

so loving glad i'm out of here in 2 weeks

i make sure everything degrades gracefully in ie8 so it alteast works even if it isn't really pretty. healthcare means ie8 is still everywhere

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
on the other end of end of the spectrum, a pm complained our site went unresponsive (only) in a chrome beta -_-

Bloody
Mar 3, 2013

meatpotato posted:

Are MBAs the STEM equivalent of a Library Science degree for the humanities, or is the knowledge actually practical? I've heard MBAs are all about making connections while in the program.


I like this idea, my weekends are mostly empty and this could make me feel good.

very much about connections & personal brand

like if you aren't going to a top 5 or maybe 10 mba program why even bother

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?

meatpotato posted:

Are MBAs the STEM equivalent of a Library Science degree for the humanities, or is the knowledge actually practical? I've heard MBAs are all about making connections while in the program.

an MBA from the right program is all about having the connections or money or status to get accepted to the program in the first place, and is a signifier that you should be accepted to the global financial-managerial caste.

an MBA from the wrong program is pretty much a worthless waste of money. it's not like it will actual teach you something about running a business, managing people, or accounting.

it's like going to law school: if you don't go to a top school and get a top internship while there, at the right age, you will not get a job with a law firm. if that's you're goal and you don't get accepted to like one of five specific schools just give up. you can still practice law, of course, once you pass the bar, but good luck getting hired by anyone who can pay real money.

Notorious b.s.d.
Jan 25, 2003

by Reene

eschaton posted:

an MBA from the right program is all about having the connections or money or status to get accepted to the program in the first place, and is a signifier that you should be accepted to the global financial-managerial caste.

an MBA from the wrong program is pretty much a worthless waste of money. it's not like it will actual teach you something about running a business, managing people, or accounting.

it's like going to law school: if you don't go to a top school and get a top internship while there, at the right age, you will not get a job with a law firm. if that's you're goal and you don't get accepted to like one of five specific schools just give up. you can still practice law, of course, once you pass the bar, but good luck getting hired by anyone who can pay real money.

an mba from a lovely program won't open the doors to the temples of capital, no

but it might get you promoted in your existing lovely job when it's you vs an outside hire

and it is one of the easiest things to get work to pay for

Notorious b.s.d.
Jan 25, 2003

by Reene

meatpotato posted:

I work for the only tech company in town and I walk to work somewhere in a nicer part of the (extended) SF bay area. Rent is cheap, house is nice, I live downtown, salary is not good for SF but decent here but my work is meaningless garbage. With these (super) first word problems and no internal direction, what would Y'ALLSPOS do?

all paying work becomes meaningless garbage after a while

if it was meaningful and life-fulfilling they wouldn't have to pay you to do it. for example: museum curation, charity fundraising, creating art and music

working on other people's technology projects is invariably boring and lovely no matter the niche, work, etc. it's just a sliding scale of how much it hurts you during the day, and how much you get paid.

yippee cahier
Mar 28, 2005


if you're feeding and housing yourself at the moment you can afford to wait for a no brainer good opportunity to show up. i'm in a similar situation. life's comfortable, but i could be doing more. i registered a business to do some contracting work to see if anything interesting comes up. at the very least it'll be good networking and novel (to me) projects.

distortion park
Apr 25, 2011


there's a quote from warren buffet where he says running a business school is a great business to be in because no one wants to go to a cheap one

Vanadium
Jan 8, 2005

dear terrible programmer thread, i can now read gdb-produced annotated disassembly well enough to verify that my understanding of dynamic linking is laughably naive, this was a very rewarding experience.

i still haven't figured out how to ask gdb for the address/contents of the plt and/or got entries for a given symbol in a specific dynamic library in my process :(

Funk In Shoe
Apr 20, 2008

Waiting in line, Mr. Haydon told me it is a wheel not meant for lovers but for infants, lifting people and letting them swing, putting the world on display from up high

Checking in: still a terrible programmer. I'm trying to learn enough to get the android phone robot to handle a wavefront mapping of our house so my kid can tell the robot to go to specific places (e.g.: "go to my room!) and have it go there. But the wavefront algorithm is wreaking havoc on my self esteem; its so simple to understand and so hard to actually make an android phone do . And I still hate Java.

Workaday Wizard
Oct 23, 2009

by Pragmatica
whoever decided that java regex Matcher.group(int) should return null for unmatched groups is a dickhead. is that decision even defensible? does it make sense to not return an empty string?

i am talking about regex like this: "(no )?dick( length=\d+)?"
java says these groups are NULL in "no dick"

sarehu
Apr 20, 2007

(call/cc call/cc)
So you want to not be able to distinguish between an empty matched group and an unmatched group?

And you want in-band signaling of the unmatched outcome instead?

Just use ((?:no )?) problem solved.

Bloody
Mar 3, 2013

why don't they use the expressiveness of a type system to handle it

Stringent
Dec 22, 2004


image text goes here

Vanadium posted:

dear terrible programmer thread, i can now read gdb-produced annotated disassembly well enough to verify that my understanding of dynamic linking is laughably naive, this was a very rewarding experience.

i still haven't figured out how to ask gdb for the address/contents of the plt and/or got entries for a given symbol in a specific dynamic library in my process :(

why are you having to do this?

VikingofRock
Aug 24, 2008




Yeah shouldn't it return an Optional<RegexMatch>?

Workaday Wizard
Oct 23, 2009

by Pragmatica

sarehu posted:

So you want to not be able to distinguish between an empty matched group and an unmatched group?

And you want in-band signaling of the unmatched outcome instead?

Just use ((?:no )?) problem solved.

is that a useful distinction?

Vanadium
Jan 8, 2005

Stringent posted:

why are you having to do this?

because work stuff is mind numbing and i'm trying to keep learning things on the weekends at least! :(

i was trying to figure out how taking the address of a function with external linkage works and whether it has an entry in the global offset table that's separate from the one that's used for actually calling the function via the plt (apparentlyit does), and in the end i just asked gdb for all the sections in my shared library and manually looked at the right address, where it helpfully did annotate everything, so it's all right.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Shinku ABOOKEN posted:

is that a useful distinction?

Yes?

Consider a regex like /(\w*)|\s*/. Or /^(?:(\w*),)?(\w*)$/

If you want your group to always match, but maybe it ends up matching the empty string, then just write your regex so that's the case.

Shaggar
Apr 26, 2006

Shinku ABOOKEN posted:

is that a useful distinction?

yeah if you're matching things where an empty string is a valid input you want null if its not matched at all

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
tbh i'm not a huge fan of single value returns from a regex matching function. in my mind you should get back some sort of Iterable<RegExResult> list type even if there's only one result. it's an easier distinction from no results vs empty value results vs some kind of error

Adbot
ADBOT LOVES YOU

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord

Funk In Shoe posted:

I'm trying to learn enough to get the android phone robot to handle a wavefront mapping of our house
so is "wavefront" an established term for a breadth first search or is it just that one guy's blog

  • Locked thread