[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

retard devs

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 1

File: k2zZUfG.jpg (130KB, 1000x707px) Image search: [Google]
k2zZUfG.jpg
130KB, 1000x707px
Today, I had to "reverse engineer" a Java desktop application and I got my hands on the ultimate password encryption in the process, but really. I knew most Java programmers are retards, but I never expected to see something like this in an enterprise level application (distributed around different countries).:

https://pastebin.com/9Edz8C1K

This code generates the database password If you call getCode(0).
>>
public String getCode(int i)
{
return doGetCode(i);
}

I fucking hate java programmers
>>
>a for loop has a dedicated method
rajesh, what are you doing?
>>
>>61819191
This was written by either a diversity hire, or by some higher-ups nephew or son whom "needs some work experience".
Alternatively outsourcing, but that kind of code is below even pajeet tier, so I don't think so.
>>
>>61819191
My favourite part is the forLoop method.
>>
>>61819290
The application published a REST API for the other part that is a Chromium based front end. The server needs 30-60seconds to start up.

The code is really fucked up.
>>
Wait so

>array of hardcoded strings
>get run through a bunch of retarded string manipulation when queried
>absolutely no reason other than to make the retrieval take more time

Am I understanding this right?
>>
>>61820412
Yes :3
>>
>>61819215
public String getModuleToken(String moduleToken) {
return moduleToken;
}


From a cs graduate meme thread a while ago
>>
>>61819215
I've seen constructions like this in Linux Kernel when I wondered how spinlocks worked.
http://elixir.free-electrons.com/linux/latest/source/include/linux/spinlock.h
spin_lock_irq
is defined as
static __always_inline void spin_lock_irq(spinlock_t *lock)
{
raw_spin_lock_irq(&lock->rlock);
}


raw_spin_lock_irq
is a macro that is defined as
_raw_spin_lock_irq(lock)
We follow it to http://elixir.free-electrons.com/linux/latest/source/kernel/locking/spinlock.c#L165:

void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock)
{
__raw_spin_lock_irq(lock); // editor note: now it's 2 fucking underscores
}
#endif


And at last http://elixir.free-electrons.com/linux/latest/source/include/linux/spinlock_api_smp.h#L124:
static inline void __raw_spin_lock(raw_spinlock_t *lock)
{
preempt_disable();
spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
}


I mean, I kind of see why this is so, but it's fucking overboard.
>>
>>61819191
Most people on /g/ writes code like this.
>>
>>61820614
>How many levels of underscores are you on
>I dont know maybe 1 or 2
>You're like a little babby, watch this

static inline void ________________________________________________raw_spin_lock(raw_spinlock_t *lock)
>>
>>61819191
What the fuck lmao why
>>
>>61820614
Undefined behaviour.
>>
>>61821469
kek
Thread posts: 15
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.