[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]

what's the most Pajeet programming thing you've ever

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: 88
Thread images: 15

File: 1468879870998.jpg (50KB, 633x758px) Image search: [Google]
1468879870998.jpg
50KB, 633x758px
what's the most Pajeet programming thing you've ever see done?
>mfw one Pajeet programmer removed the extra line breaks in my C code so that it would run faster
>>
>>55732179
I first read this as if he removed the break; statements which is something I have (not) seen.
>>
>>55732179
I made an Android app.
>>
>>55732289
Sorry I'm not OP forgot to remove my trip.
>>
>>55732179
I was a website once made by an actual rakesh who allowed to post comments containing xss code
>>
>>55732342
saw*
>>
File: 1421719357015.png (112KB, 297x282px) Image search: [Google]
1421719357015.png
112KB, 297x282px
>mfw I found out that Pajeet is not even an Indian name
>>
>>55732179
electron application modifies its own HTML and uses it as a database
>>
>>55732300
>trip
>>
>>55732514
the fuck? what would be the point?
>>
>>55732535
he didn't know databases
>>
>>55732179
My boss said get busy pajeet to an indian, named pajeet, over voice chat.
>>
I'm a professional PHP developer.
>>
File: tmp_12066-images1302788285.jpg (5KB, 189x267px) Image search: [Google]
tmp_12066-images1302788285.jpg
5KB, 189x267px
>>55732604
>>
>>55732179
if x > 5 then
isOn = true
else
isOn = false
endif
>>
>>55732179
I don't comment my code
>>
>>55733507
This is the reason why the world is still at war. Let's fix this

isOn = x > 5
>>
>>55732556
lol
>>
File: disappointment.jpg (57KB, 640x480px) Image search: [Google]
disappointment.jpg
57KB, 640x480px
>>55732486
>mfw I found out that Britbong is not even an English name
>>
>mfw one pajeet insistingly pushes classes without getter setter methods
>mfw I have to change the whole code when there must be special treatments for getter/setter of specific variables

FUCKING PAJEET PUT GETTER SETTERS THE COMPILER ALREADY INLINES THEM IF IT'S SIMPLY GET AND SET RRRRRRRRREEEEE
>>
>>55732535
Dev was presumably trying to build a TiddlyWiki, but with more electrons
>>
>>55733557
does this work in bash?
>>
File: Cl1IoNiVEAEB08r.jpg (68KB, 750x726px) Image search: [Google]
Cl1IoNiVEAEB08r.jpg
68KB, 750x726px
>>55733614
>using java
we all know who the true pajeet is here son
>>
>>55733689
it's c++, fucking faggot. if java is the only language you know that has oop paradigms, you are the indian beauty.
>>
File: 1467308629373.jpg (324KB, 583x1508px) Image search: [Google]
1467308629373.jpg
324KB, 583x1508px
>>55733726
>using getter/setters in C++
>calling me a pajeet
kill yourself kiddo
>>
File: Windows_9_SearchCode_Wide.jpg (484KB, 1147x1447px) Image search: [Google]
Windows_9_SearchCode_Wide.jpg
484KB, 1147x1447px
>>
>>55733788
w-whats better?
>>
>>55732179
there was this one pajeet that made google panda algorithm.
>>
>>55733816
>in openjdk
Really? wow
>>
>>55733817
he's just meming. like a classical faggot. if you're going with oop paradigm, you will need getters/setters for specific access patterns on variables. new keywords like mutable, override etc. will especially be good for that purpose.
>>
I made a website for 60 dollars per hour.

In pure html.

I still get asked to do updates sometimes. For 60 dollars per hour.
>>
>>55734038
I can code now and would like to replace the website with something real. But I'm not sure if that would make my client happy. So I just leave it be.
>>
>>55734038
>>55734074
My man.
>>
>>55734038
Was there even any CSS? Was all styling inline?
>>
>>55734038
They probably make more than you so they didn't bother to shop around.
>>
>>55734123
Nothing tables cant fix.
>>
>>55734123
Mostly inline. I just looked at the source code the only thing in a style.css file is the text markup.

I see I defined 7 paragraph tags and 7 heading tags.
>>
File: ayy_0.jpg (216KB, 1600x1200px) Image search: [Google]
ayy_0.jpg
216KB, 1600x1200px
>>55732521
>>55732300
JUST
>>
Writing getters and setters.
>>
>>55732179

Null terminate a single byte field. Not the first time this happened, I had put a giant comment above this line telling the pajeets that this field was not to be null terminated because it would corrupt the database (this was low level record handling code in a realtime database). It didn't slow the diapered fuckers down even a bit. I eventually wrote a script for the nightly build that checked this piece of the ~50MLOC codebase and aborted if it had been changed, which helped prevent our customers data from getting trashed.
>>
>>55734468
only a pajeet would not write getters and setters. not everyone is programming in their basement, kiddo. some people actually program in teams.
>>
>>55733507

Glorious See Sharp.

bool isOn = x > 5 == true ? true : false
>>
He couldn't understand the difference between passing by value and passing by reference.
I saved a lot of RAM that day.
>>
>>55734554
glorious js
isOn=x>5
>>
>>55734590
But can it do this?

bool notEmptySpaceOrNull = (!string.IsNullOrWhiteSpace(randomString)) ? true : false
>>
Getters and Setters for all private fields is just stupid.
It breaks encapsulation for no fucking reason.
Might as well declare them public.

And don't go on about changing the code inside getters and setters later.
If you do, then they don't get or set fields anymore, so their names are a lie.
Chances are if you change a getter from reading a field to computing something,
you should give it a proper name, rather than GetXXX.
When one reads Object.GetXXX() one expects that it's fast and idempotent, as in it just reads a field from the object.
If you later change it to do something complex, possibly non-idempotent, you are just asking for trouble.

Just make it a normal fucking method with a reasonable name which reflects the high level objective of reading/writing that field.
Using normal method names does not carry all the assumptions using GetXXX and SetXXX does.
>>
>>55734630
var notEmptySpaceOrNull = (!randomString && [0, NaN, false, undefined].indexOf(randomString) > -1) ? true : false
>>
>>55734699
>>55734527
forgot to link
>>
>>55734514
Holy shit
>>
>>55734514
How long you been doing this shit for, famamamalama?
>>
File: watch_it_bunn.jpg (23KB, 500x368px) Image search: [Google]
watch_it_bunn.jpg
23KB, 500x368px
>>55733608
>mfw I found out that Erdoroach is not even a Turkish name
>>
File: 1427647778136.png (91KB, 630x686px) Image search: [Google]
1427647778136.png
91KB, 630x686px
>>55732179
But it wouldnt?

The compiler would remove all line breaks and white space, along with comments. So there is literally no point in deleting extra line breaks, right? Or am i retarded?
>>
File: image.jpg (43KB, 476x270px) Image search: [Google]
image.jpg
43KB, 476x270px
>>55732179
>>
It may make the build a bit faster.
But that's probably not even measurable.
>>
I do entry-level web dev for a living
>>
>>55735097
You're right and yet still a retard.
>>
>>55735209
Found the pajeet. Are you fucking serious? Have you ever heard about compiling?
>>
Wouldn't minifying your code be good for embedded development?
>>
>>55735313
No.
>>
>>55735313
Guess what just hit my Desk.
>>
>>55734721
>>55734699
GETXXX IS OPTIMIZED BY THE COMPILER TO BE INLINE IF IT'S A SIMPLE GET OPERATION

what part of it can't you understand?

if you have a data structure to be encapsulated, use a fucking struct. OOP paradigm starts with the classes. Nobody has to spend time to read your shitty code. directly accessing variables in classes is harmful for future reusability. Unless it's a const variable, you need to use that shit. OOP is supposed to be developer friendly, not performance based. Even so, a modern compiler always has to optimize a lot of oop stuff. There are keywords like const, constexpr, virtual, override, mutable, templates etc. to regulate your access patterns.


>>55735209
yeah by 0.000000001ns due to parser skipping spaces, pfff.
>>
>>55735393
No idea.
>>
>>55735407
MY HEAD
>>
thanks to >>55733507

we now see the /g/tards come out of the basement and say "ho ho look how smart I am, I can solve this insane pajeet problem!"
>>55734554
>>55734630
>>55733557
>>55734717
>>
>>55735442
If you legitimately think that was the point behind those posts, then I think I can fairly assess that you're either delusional or just generally mentally incapacitated for the most part.
>>
>>55732486
That's what's great about it: it's just supposed to kind of sound Indian.
>>
OOP

IN

LOO
>>
>>55734554
Conditional statement fag.
>>
One guy I've worked with, was writing an AI for homing missiles in a mobile game. Pretty easy stuff, just activate, find a closest enemy and fly there.
He made a method getClosestEnemy that sorted the list of all enemies in the level by the Euclidean distance to the player: sqrt(x^2 + y^2).
For some reason, he didn't store that closest enemy in a variable. For some reason, he was asking for the closest enemy 6 times during the lock-on. Each frame. Even after the target was locked.
Each fired missile, each frame, sorted an array of each enemy, calculating the Euclidean distance to the player.
In a mobile game. This shit probably would go unnoticed if it wasn't a mobile game.
>>
>>55735692
what the fuck
>>
>>55735692
That idiot! He doesn't even need to take the sqrt if he just wanted to sort the list. he could've just skipped the most expensive operation in the entire algorithm.
>>
>>55736056
Yes, it's a general rule, usually you never need sqrt. Only the square of the distance.
>>
>>55734554
i really hope this is bait
>>
File: image_2016-07-24_19-10-46.png (120KB, 977x749px) Image search: [Google]
image_2016-07-24_19-10-46.png
120KB, 977x749px
>>55736056
Yep. Well, it was a year ago and I lied - it wasn't "getClosestEnemy", it would be too easy to understand. He called it "getFirstEnemyInList".
And this logic (that didn't even work properly), I didn't even try to comprehend, just scrapped this shit completely and rewrote it.
>>
>>55736332
>4 spaces indentation
Why is it a surprise?
>>
>>55734554
This is just a condense statement. Literally does nothing to improve speed. If anything it decreases readability.

Most languages have support for true false values based on integers.

IsOn = (x > 5)

Would be more acceptable.
>>
File: 1466383177244.jpg (111KB, 394x394px) Image search: [Google]
1466383177244.jpg
111KB, 394x394px
$user_id = $_COOKIE['user_id'];
$logged_in = $user_id > 0;
>>
>>55736366
It's a clusterfuck of an indentation. There's no indentation, dude just had seizure on the tab/space/enter key.
Also
>return true;}
>this.isInVisualContact ()
>>
>>55732179
<a href="index.php?/login">
Log <?=array_key_exists("authorized", $this->data)?"out":"in"?>
</a>
>>
>>55736332
this is production code?
>>
>>55732179
• conditionals nested 7 layers deep
• <br></br>
• https://en.wikipedia.org/wiki/XOR_swap_algorithm
>>
>>55736519
It's code for some stupid college project.
>>
>>55736519
Almost, it didn't pass my review.
>>55737064
University, but yeah. And not so stupid, we've made a pretty cool game.
>>
>>55734035
Depends on the situation.
Very often, you would not use setters/getters.
You would have actions where you mutate variables rather than just changing the variables.

I have written many classes where the protected variables is hidden because they should not matter to the user.
In classes where the data does matter to the user, you might as well expose it, unless it is important to check for errors or do something else when the values change.

The idea of object oriented code is that you should design objects which do things.

That shouldn't translate into an arbitrary number of setters and getters.
>>
literally, the PHP facebook group
>>
>>55732179
I was working on a website that had been initially developed cheaply in India. Rather than use an actual version control system, Pajeet would copy+paste sections of PHP code into block comments and write what he changed. Each file was 10,000+ lines long of almost entirely commented out code
>>
File: 1456011521059.png (51KB, 625x626px) Image search: [Google]
1456011521059.png
51KB, 625x626px
>>55734554
>>
>>55732486
Ajeet is anyway
Thread posts: 88
Thread images: 15


[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.