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
TheresaJayne
Jul 1, 2011

QuarkJets posted:

Hmm

I know for a fact that Facebook and other "big data" web companies (Twitter, LinkedIn, etc) hire a lot of former scientists as "Big Data" analysts. When someone says that they analyze "big data" it's likely that they have a degree in physics or something, IE a degree where the computer science training is practically nonexistent. I wonder how many of these engineers rose through the ranks to become software leads, resulting in all of the bizarre stories that we're hearing about Facebook in the last couple of threads?

Hacking Android in order to fit a round peg into a square hole and then praising themselves as genius hackers? That sounds exactly like something that I'd expect from science coding and all of the anecdotes that relate to science code.

It makes me wonder what kind of horrors can be found in the Twitter code base

One of the problems i have seen in the past is where a job requires a degree.

So me a life time developer (20+ years) cannot get the job but the snotty little post grad can because they have a Douglas in Sociology.

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

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

QuarkJets posted:

So then your argument is that their app design process was superb, despite creating a slower and less efficient app than their competitors, and hacking the dalvik instead of a refactor was proof of this?

You keep saying "refactor" but I'm not sure you know what this means. "Refactoring" isn't magical fairy dust that makes your code better and smaller when you sprinkle it atop. At Audible, we had to deal with multidex when we wanted to bring audio into the play version of the Kindle Reader app. I can assure you that "refactoring" wouldn't have solved the issue, because despite looking simple on the surface, Kindle Reader is actually really complicated and has to deal with a bunch of older formats basically forever. Is the audio player bloat? Maybe, but I'm sure that it's extremely profitable bloat, which is all that really matters at the end of the day.

As completely ugly as Facebook's solution was, there isn't a good alternative, and suggesting "just make your code smaller gawd your dumb" implies a staggering level of ignorance, especially when it comes to support libraries, development libraries, etc bloating up the method count.

Software engineering is about Solving Problems, not playing code golf.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

ExcessBLarg! posted:

...first to have a clever solution to the problem...

It's more that they were too big to fail and Google kept the hack working:
https://android.googlesource.com/platform/libcore/+/81abb6fb7332dfe62ff596ffb250d8aec61895df%5E!/

Reflecting into private, non-API fields isn't a clever solution, it's a hack. They just got away with it because breaking Facebook is bad. This is orthogonal to the original problem, which is real for everyone supporting legacy devices (and getting worse because Google doesn't give a gently caress and keeps bloating its support libs).

Hiowf fucked around with this message at 13:35 on Apr 13, 2015

kitten smoothie
Dec 29, 2001

Skuto posted:

and getting worse because Google doesn't give a gently caress and keeps bloating its support libs

In fairness they did recently start providing Play Services jars that are broken down according to what functions they support. For instance my team's app only uses GCM, so I can strip out all the fused location, game matchmaking, etc stuff that lands into the kitchen sink that is Play Services. That bought back a ton of dex count space.

It was the case before that just the support lib and Play Services jar would put you at like 30k symbols right before you wrote a single line of original code of your own.

It sucks that a common reality now of Android development is that library developers have to care hard about symbol counts, and library users often have to make performance/symbol count tradeoffs (IIRC Gson vs Jackson is one such situation where Jackson is faster but Gson has a smaller dex footprint).

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Scroogle'd :D

Every time I start to think "It'd be fun to learn the Android API, I know Java pretty well", I read something like this and lose all motivation again.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I'm the internal bug URL in a public code dump.

feedmegin
Jul 30, 2008

Volmarias posted:

I can assure you that "refactoring" wouldn't have solved the issue, because despite looking simple on the surface, Kindle Reader is actually really complicated and has to deal with a bunch of older formats basically forever.

He's not kidding, this is a code horror in itself. I wrote a Mobipocket (which is the format Kindle started out with) ereader for Android for fun, using Qt. Under the hood, Mobipocket is just one giant HTML 3.2 file (yes, that old) containing the text of the book, with GIFs the only allowable image type and that with a strict size restriction, stored in a series of LZ-encoded 4k buckets within an arcane archive format that originated on the Palm Pilot. There's some serious software archaeology in there. Kindle has a new totally different format that by all accounts is much better, but there are still zillions and zillions of books out there in the old format of course.

ExcessBLarg!
Sep 1, 2001

LeftistMuslimObama posted:

Every time I start to think "It'd be fun to learn the Android API, I know Java pretty well", I read something like this and lose all motivation again.
Android isn't bad, at all, if you start off using Android Studio and you restrict your apps to recent versions of Android only. API 16+ (Jelly Bean 4.1) is a reasonable target these days, which is compatible with 88% of the devices in current use.

Where Android becomes a problem is when you have to provide legacy support for 2.x devices, make use of a bunch of Google services, and use the old Eclipse/ADT-based build system. But you can pretend none of that exists and you're good.

omeg
Sep 3, 2012

Driver validating user mode input:

C++ code:
if (unmap_notify->notify_offset > this_rq_data->record->n_pages * PAGE_SIZE)
{
    DEBUGF("notify_offest outside of mapped area");
    rc = STATUS_INVALID_PARAMETER;
    break;
}
:negative:

Volmarias
Dec 31, 2002

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

ExcessBLarg! posted:

Android isn't bad, at all, if you start off using Android Studio and you restrict your apps to recent versions of Android only. API 16+ (Jelly Bean 4.1) is a reasonable target these days, which is compatible with 88% of the devices in current use.

Where Android becomes a problem is when you have to provide legacy support for 2.x devices, make use of a bunch of Google services, and use the old Eclipse/ADT-based build system. But you can pretend none of that exists and you're good.

Pretty much this. There's no better time to start learning, honestly. Android studio, with a fallback to Eclipse if you truly must, dramatically better documentation, most newer devices PROBABLY wont burst into flames if you only call public APIs, and compatibility libraries that mean you aren't on some ancient version of UI forever. Target the API level of your personal device while you get started.

The Dalvik patch thing is a truly extreme example and shouldn't dissuade you.

return0
Apr 11, 2007

ExcessBLarg! posted:

Android isn't bad, at all, if you start off using Android Studio and you restrict your apps to recent versions of Android only. API 16+ (Jelly Bean 4.1) is a reasonable target these days, which is compatible with 88% of the devices in current use.

Where Android becomes a problem is when you have to provide legacy support for 2.x devices, make use of a bunch of Google services, and use the old Eclipse/ADT-based build system. But you can pretend none of that exists and you're good.

What if you need to use the NDK, does that work properly/nicely with Android Studio yet?

shodanjr_gr
Nov 20, 2007

omeg posted:

Driver validating user mode input:

C++ code:
if (unmap_notify->notify_offset > this_rq_data->record->n_pages * PAGE_SIZE)
{
    DEBUGF("notify_offest outside of mapped area");
    rc = STATUS_INVALID_PARAMETER;
    break;
}
:negative:

Is the horror the break; statement instead of "return" or "return rc"? Is it the spelling mistake in the trace statement? Is it me?

e: Probably copy-pasted from a while(true){} wrapped initialization code-segment?

e2: Never mind, just properly parsed the if statement condition.

shodanjr_gr fucked around with this message at 02:36 on Apr 14, 2015

dc3k
Feb 18, 2003

what.

shodanjr_gr posted:

Is the horror the break; statement instead of "return" or "return rc"? Is it the spelling mistake in the trace statement? Is it me?

e: Probably copy-pasted from a while(true){} wrapped initialization code-segment?

http://code.metager.de/source/xref/QubesOS/qubes-r2/vmm-xen-windows-pvdrivers/xenpci/gntmem_device_interface.c#733

?

fritz
Jul 26, 2003

return0 posted:

What if you need to use the NDK, does that work properly/nicely with Android Studio yet?

I've found that it's functional, in that if you set things up manually it'll probably work, but when it comes to android I'm a coding horror.

Plorkyeran
Mar 22, 2007

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

return0 posted:

What if you need to use the NDK, does that work properly/nicely with Android Studio yet?

Hopefully you enjoy using gdb via the CLI. The NDK tooling is comically bad, but I guess it's basically functional now.

VikingofRock
Aug 24, 2008




omeg posted:

Driver validating user mode input:

C++ code:

if (unmap_notify->notify_offset > this_rq_data->record->n_pages * PAGE_SIZE)
{
    DEBUGF("notify_offest outside of mapped area");
    rc = STATUS_INVALID_PARAMETER;
    break;
}

What am I missing here?

shodanjr_gr
Nov 20, 2007

VikingofRock posted:

What am I missing here?

From what I gather, notify_offset is probably used to index an array of size n_pages * PAGE_SIZE. Also, it's spelled notify_offest in the trace statement.

omeg
Sep 3, 2012


Yeah it's the GPL Xen pvdrivers for Windows. That offset is later used to write into a memory region and if the value is equal to the region size... fun stuff happens (BSOD).

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
So it's just a classical fencepost error?

omeg
Sep 3, 2012

Skuto posted:

So it's just a classical fencepost error?

Yup. I expected better from someone writing kernel-mode code.

I know I shouldn't.

omeg
Sep 3, 2012

How to Fix Problems Installing or Playing GTAV PC On Windows User Accounts Containing Certain Characters

Hughlander
May 11, 2005


I know at least one game I've worked on had that. Was using a narrow string for a path.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Cool. My name (and thus my Windows user name) contains a dash, which is unsupported according to that page. :ughh:

e: Also, for the same reason I can't use my actual name as my gmail address.

xzzy
Mar 5, 2009

Wheany posted:

Cool. My name (and thus my Windows user name) contains a dash, which is unsupported according to that page. :ughh:

They had to save CPU somewhere man, you can't just go around parsing the full ascii table like it's free. Think of those precious cycles!

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
Everyone knows names with dashes are SQL injections!

Thermopyle
Jul 1, 2003

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


It feels like this kind of bullshit is always coming out of a few places like Rockstar and Ubisoft.

omeg
Sep 3, 2012

I don't know, do they also perform zero i18n testing? Stuff like that was one of the more basic things to check for when I was working in that field (i18n).
I wonder if it runs at all on Turkish Windows.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

omeg posted:

I don't know, do they also perform zero i18n testing? Stuff like that was one of the more basic things to check for when I was working in that field (i18n).
I wonder if it runs at all on Turkish Windows.
This wouldn't have happened if we still had Games for Windows certification. :colbert:

Hughlander posted:

I know at least one game I've worked on had that. Was using a narrow string for a path.
Curiously you can get away with narrow strings if you're using the classic ANSI API. It's when you mix them up that things go badly.

itskage
Aug 26, 2003


Dammit. I came here to post that.

Have this instead:
http://www.polygon.com/2015/4/14/8411795/mortal-kombat-x-steam-streaming-install

Not really a coding horror, but a planning/deployment horror.

Edit: Although the crash to desktop when you don't have the packs would definitely qualify as one.

itskage fucked around with this message at 19:42 on Apr 14, 2015

pseudorandom name
May 6, 2007

omeg posted:

I wonder if it runs at all on Turkish Windows.

I'm going to guess yes, but not on Hungarian Windows (FOLDERID_ProgramFiles is C:\Programfájlok)

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

pseudorandom name posted:

I'm going to guess yes, but not on Hungarian Windows (FOLDERID_ProgramFiles is C:\Programfájlok)
Is it actually that or does the shell just display it this way? I thought Microsoft made the actual folder name "Program Files" on all versions starting with Vista because programmers are really loving bad when it comes to localization and trying to make them care about it is a losing battle.

The_Franz
Aug 8, 2003

Thermopyle posted:

It feels like this kind of bullshit is always coming out of a few places like Rockstar and Ubisoft.

Probably because they have interns write "easy code" like that. Interns who have never dealt with unicode or have ever had to think about languages that have non-ASCII characters.

evensevenone
May 12, 2001
Glass is a solid.
Hilarious game-breaking bugs in a AAA title on launch day?

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

The_Franz posted:

Probably because they have interns write "easy code" like that. Interns who have never dealt with unicode or have ever had to think about languages that have non-ASCII characters.

This is far beyond unicode unfamiliarity - more than half of ASCII is verboten, too :v:

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Bonfire Lit posted:

Is it actually that or does the shell just display it this way? I thought Microsoft made the actual folder name "Program Files" on all versions starting with Vista because programmers are really loving bad when it comes to localization and trying to make them care about it is a losing battle.
Yeah it's just an alias now, I remember back in the old days you would find yourself with 5 differently-named "Program Files" after a while, including misspelled versions.
Similarly once they started changing folder conventions with XP they had to keep soft-links to the old ones because programs just hardcoded that stuff.

Hughlander
May 11, 2005

SupSuper posted:

This wouldn't have happened if we still had Games for Windows certification. :colbert:

Curiously you can get away with narrow strings if you're using the classic ANSI API. It's when you mix them up that things go badly.

I'm pretty sure the title in my case had GFWL cert status and used Live networking.

fritz
Jul 26, 2003

The more I have to use visual studio and link against microsoft sdks, the more I understand why so many windows programs are terrible, just bang on it until it sort of works to make the suffering stop.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
My favorite is the way to set a thread's title in the debugger, which is to raise an exception with a magic value pulled out of some guy's blog post and not in any header.

Or the insanity of emulated touch events which make you test lpReserved against some bit flag, also undocumented.

omeg
Sep 3, 2012

Suspicious Dish posted:

My favorite is the way to set a thread's title in the debugger, which is to raise an exception with a magic value pulled out of some guy's blog post and not in any header.

It's debugger-specific since the kernel doesn't have any notion of thread names. It's in the MSDN though! :v:

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Wait, that means that if I attach a debugger to an existing process, the thread names won't be there? What the gently caress?

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