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

This thread?

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: 147
Thread images: 35

File: 1475017735253.png (405KB, 3000x2584px) Image search: [Google]
1475017735253.png
405KB, 3000x2584px
This thread?
>>
>>56828701
Why did he put a comment between the curly braces. Why is there nothing after the else.
>>
>>56828727
you fundamentally misunderstand, friend.
>>
File: b88888888888.jpg (57KB, 618x750px) Image search: [Google]
b88888888888.jpg
57KB, 618x750px
>>
File: amd stratedgy.png (224KB, 778x960px) Image search: [Google]
amd stratedgy.png
224KB, 778x960px
>>56828727
To indicate that code for windows 95/98 should go there.

The else is too show where code for other OSs should go
>>
File: are_equal.png (82KB, 694x801px) Image search: [Google]
are_equal.png
82KB, 694x801px
>>
>>56829028
I hope that this is a contrived example...
>>
>>56828787
wew
>>
>>56829028
this is art.
>>
>>56829028
fucking last semicolon!
>>
File: Ici1lvNl.jpg (38KB, 640x618px) Image search: [Google]
Ici1lvNl.jpg
38KB, 640x618px
>>
File: 1472173052219.png (116KB, 1515x663px) Image search: [Google]
1472173052219.png
116KB, 1515x663px
>>
>>56829028
Obviously you gotta compress
are_equal(x,xx){return (x>xx)?(x<xx)?(x===xx&&xx===x):false:false:false}
>>
>>56829579
This is way too advanced, you must have a Master's
>>
>>56828701

i dont even understand what this code is supposed to do
>>
>>56829548
What's the right way to do this
>>
>>56829579

WE NEED

MORE OBFUSCATION
>>
>>56829028
>He forgot the ; after return 0
What a noob. Is it a Guy from /g/ ?
>>
>>56829652
probably regexes
or at least match to an object

like if ('0123456789'.indexOf(number) > -1)
>>
>>56829652

check type using parseNextInt()

throw exception if it isnt
>>
>>56829579
bool are_equal(int x, int xx){return (x>xx)&&(x<xx)&&(x==xx)&&(xx==x);}
>>
>>56829028
I don't get it but it seems funny
>>
>>56829723
>>56829742
>>56829756
fuckin plebs
are_equal = a => {Array.prototype.slice.call(arguments).map(a => {
x>xx&&(return new Boolean(1))
x<xx&&(return new Boolean(1))
(x==xx)?(xx==x)?return new Boolean(1):return new Boolean(0):return new Boolean(0)
})}
>>
>>56829652
rinput = raw_input()

lower = map(chr, range(ord('a'), ord('z')+1))
upper = map(chr, range(ord('A'), ord('Z')+1))
digits = map(chr, range(ord('0'), ord('9')+1))

if rinput in lower o rinputr upper:
print('its a word!')
elif rinput in digits:
print('its a number!')
else:
print('that's some other shit')

and im a complete retard
>>
>>56829641
It prevents Windows 9 from being released.
>>
>>56829792
(defmethod are-equal ((x integer) (xx integer)) (and (not (> x xx)) (not (< x xx)) (eq x xx) (eq xx x) (eql x xx) (eql xx x) (equal x xx) (equal xx x) (equalp x xx) (equalp xx x) (zerop (- x xx)) (zerop (- xx x))))
>>
>>56829028
>that unconditional return false in the end

top keke
>>
>>56829652
console.log((a => (/[0-9]/.test(a))?'number':(/[a-zA-Z]/).test(a)?'word':'other')('0'))
>>
>>56829875
Oh shit, I had forgotten about =
(defmethod are-equal ((x integer) (xx integer)) (and (not (> x xx)) (not (< x xx)) (eq x xx) (eq xx x) (eql x xx) (eql xx x) (equal x xx) (equal xx x) (equalp x xx) (equalp xx x) (zerop (- x xx)) (zerop (- xx x)) (= x xx) (= xx x)))
>>
>>56829792
wait fuck so basically let the map function take 3 arguments, a b and c, replace x with a and xx with (c[b+1])
it should work
>>
https://css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
>>
>>56829652
number = raw_input('> ')

try:
test = float(number)
print "Nice number!"
except ValueError:
if all(c in string.letters for c in number):
print "That's a word"
else:
print "That's a cob of shit"
>>
File: abstract algebra.png (56KB, 695x689px) Image search: [Google]
abstract algebra.png
56KB, 695x689px
>>56830003
please don't directly link that ever
>>
>>56830003
>>56830037
http://web.archive.org/web/20160419023021/https://css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/

Sorry.
>>
>>56830037
What the el is going on in this pic
>>
>>56829652
import java.lang.*;import java.util.*;public class IsNumberOrWord extends Object {public static void main(String args[]) {try {Integer.getInteger(args[0]); System.out.println("Nice number!\n); catch(Exception ex){System.out.println("Not a number!!");}}}}
>>
>>56830066
ACTUAL abstract algebra
it's cool stuff
>>
>>56829893
wait i missed a bracket but it still works what de fug
>>
>>56830076
You forgot all the dependencies. Where is Spring? Where is the POM file?
>>
File: 1424065519259.jpg (48KB, 576x576px) Image search: [Google]
1424065519259.jpg
48KB, 576x576px
>>56829857
sure
>>
>>56829028
To be fair it could make sense in C++...
>>
>>56830090
That's linear algebra...
>>
>>56829894
>using a meme language
>>
>>56830181
technically
but it's linear algebra over GF(28)
that has to count for something, right
>>
>>56830261
shit, that showed up as a superscript when i pasted it in
pretend that said "GF(2^8)" or at least "GF(256)" or something
>>
File: 1475105305256.png (91KB, 694x710px) Image search: [Google]
1475105305256.png
91KB, 694x710px
>>56829548
>>
>>56829028
The extraneous return else, checking that it's equal in BOTH DIRECTIONS, the missing semi-colon. I think we've achieved peak I.T. student with this post.
>>
>>56830437
Kek
>>
>>56829641
Execute some code on Windows 95 and 98 only.
>>
>>56830135
How?

Unless the programmer was retarded enough define int as something else than int, no.
>>
>>56830437
but that isn't a bad idea?

or maybe it is in shit java
>>
>>56829780
the first three things encompass all mathematically possible inputs and the last line covers "everything else"
>>
File: 1475053460214.jpg (92KB, 912x576px) Image search: [Google]
1475053460214.jpg
92KB, 912x576px
Underrated thread. Have a bump, free of charge.
>>
>>56828701
kek
>>
>>56830133
>>>/9gag/
>>
>>56829028
>>56829579
>>56829756
>>56829875
>>56829894

(defun AREEQUAL(NL)
(cond ((equal L NIL) 0)
((equal (car L) N) 1)
(T (0))))
>>
>>56828787
This is a result of the time when you actually had to type the whole code yourself. Today we have IDEs, so we can actually have functions named "stringByReplacingOccurrencesOfString" instead of "replaceAll".

Oh what an exciting time we live in
>>
>>56829883
Isn't that standard practice? Would you throw an exception?
>>
File: phone1.webm (45KB, 604x176px) Image search: [Google]
phone1.webm
45KB, 604x176px
>>
File: phone2.jpg (6KB, 347x102px) Image search: [Google]
phone2.jpg
6KB, 347x102px
>>
File: phone3.webm (207KB, 694x394px) Image search: [Google]
phone3.webm
207KB, 694x394px
>>
File: phone4.webm (41KB, 320x240px) Image search: [Google]
phone4.webm
41KB, 320x240px
>>
>>56829680
semicolons are used to separate statements. if you use one after the last statement you're creating an implicit empty statement at the end of your functions.
>>
>>56834375
That's just impressively dumb as opposed to just plain fucking retarded like most example itt.
>>
>>56828787
op of that thread here ask me anything
>>
File: phone5.webm (119KB, 482x160px) Image search: [Google]
phone5.webm
119KB, 482x160px
>>56834447
they are meant to be funny. Bad ways of doing stuff.
>>
File: phone6.webm (103KB, 600x320px) Image search: [Google]
phone6.webm
103KB, 600x320px
>>
File: phone7.webm (600KB, 614x482px) Image search: [Google]
phone7.webm
600KB, 614x482px
>>56834506
>>
File: phone8.webm (190KB, 913x287px) Image search: [Google]
phone8.webm
190KB, 913x287px
Last one I have. I know it's not strictly on topic, but it's not like the thread is overflowing with content.
>>
>>56830003
>Occasionally write front-end code in PHP (WordPress) or Ruby (on Rails)
Do I miss something as him or are companies stupid?
>>
>>56834362
>>56834368
>>56834375
>>56834402
>>56834498
Link kinda related https://github.com/philipl/pifs
>>56834506
>>56834520
I'm certain one hippie has this on his phone.
>>56834530
Has someone made a git repo of the most ridiculous imaginable ways of inputting your phone number or what?
>>
>>56834251
>stringByReplacingOccurrencesOfString
Pajeet KYS
>>
>>56834362
>>56834368
>>56834375
>>56834402
>>56834498
>>56834506
>>56834520
Post the binary search one
>>
>>56828787
>tfw the botnet wants you to be a webdev
>>
>>56834628
irony detectors broken today?
Swift is one of the worst languages I've ever had to use
>>
>>56829548
STOP
>>
File: equal.jpg (12KB, 248x97px) Image search: [Google]
equal.jpg
12KB, 248x97px
>>56829028
>>56829579
>>56829756
>>
File: perl.png (104KB, 876x1227px) Image search: [Google]
perl.png
104KB, 876x1227px
>>
>>56834402
this is my favourite
>>
>>56834506
what's the easiest way to achieve that ? i dont get the translation from checkboxes to int.
Does he check the whole group and see if it fit a pattern?
>>
>>56830437
I just started learning java this week.
Why wouldn't this work?
>>
File: 1473001669268.jpg (60KB, 476x687px) Image search: [Google]
1473001669268.jpg
60KB, 476x687px
>>56828787
it should be #include <stdio.h> and not studio.h you fucking retard kill yourself nowwww DELETEEEEEEEEEEEEEEEEEEEEEEEEE THISSSSSSS!!!!!
>>
>>56829641
it's a joke
Microsoft never made Windows 9 because some of their code counted "Windows 9" as 95 or 98, which is retarded.
>>
>>56832647
>>56835591

Not him
>>56830437
not good and programming either

but I think what he meant was lenght of the number. Try parsing number that is out of range of int.
>>
>>56832647
>>56835591

there's instanceOf for typechecking in java
>>
>>56835765
wew
>>
>>56835683
Please tell me more...
>>
>>56829652
try{
Integer.valueOf(number);
print "number"
}catch(){
print "word"
}
>>
>>56828701
I forced this meme
I didn't know it was true

Windows version numbers are the lead cause of software and especially drivers breaking in new windows versions.
>>
>>56828701
Is this why MS skipped Windows 9 and went straight to 10?
>>
>>56836233
Exactly.
>>
>>56835701
it was vendors code that had that
>>
>>56836962
This.

Although, I've heard it was partially because the official way of querying for version was broken, so it may have been partly Microsoft's fault.
>>
File: Tomorrowdate.jpg (41KB, 506x584px) Image search: [Google]
Tomorrowdate.jpg
41KB, 506x584px
>>
>>56834468
>dope
>Python fag here
>I use Python 2.7 because Python 3.X is not supported
>dope
>C is too complicated so Python is better
>Pliz subscroob to my dope blog
>dope
>>
>>56829530
>we had to program like this for nearly a month in my first Java course because the instructor wouldn't let us use and code that hadn't been tought yet
>>
File: 2016_network_administrators.jpg (71KB, 864x505px) Image search: [Google]
2016_network_administrators.jpg
71KB, 864x505px
>>
>>56828787
I've never even written in C past hello world and I want to jump off a bridge now
>>
>>56834322
The only reason to write that function in the first place is if you needed to use it as a callback. But even then, the whole function could just be one line:
return x == xx;
>>
File: 5 minute paint job.png (233KB, 870x663px) Image search: [Google]
5 minute paint job.png
233KB, 870x663px
>>
>>56828701
 Install Gentoo. 
>>
>>56837786
insanely underrated
>>
File: 20160916_143559.jpg (1MB, 2560x1920px) Image search: [Google]
20160916_143559.jpg
1MB, 2560x1920px
>>
File: record12.webm (2MB, 1364x764px) Image search: [Google]
record12.webm
2MB, 1364x764px
>>
>>56834251
Yeah, he has no idea what "stdio" means, he should definitely be writing code.
>>
>>56835545
Looks like he has a listener for the checks that runs a loop that does exactly what you thought, searches for a pattern and than associates it with an integer.
>>
>>56837786
>>56839868
Best part is if that isn't WINAPI Sleep() then that will sleep for 1000 days.
>>
>>56834530
>>56834520
>>56834506
>get system time in microseconds
>modulo by 10,000,000,000
>"Is this your number?"
>>
>>56837860
You can't be serious. Memes aside, was he Indian by any chance?
>>
>>56833683

function AreEqual(x: Integer; xx: Integer): Boolean; begin AreEqual := false; if x > xx then AreEqual := false; if xx > x then AreEqual := false; if (x = xx) and (xx = x) then AreEqual := true; end;


Pleb.
>>
>>56835305
To pleb to handle Perl?
>>
>>56843182
Baiting this weak
>>
>>56828701
// new averaging system
float pp;
float x;
float xx;
float xxx;
float xxxx;
float xxxxx;
float xxxxxx;
float xxxxxxx;
float xxxxxxxx;
float xxxxxxxxx;
float xxxxxxxxxx;
float xxxxxxxxxxx;
float xxxxxxxxxxxx;
float xxxxxxxxxxxxx;
float xxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxxxxxx;
float xxxxxxxxxxxxxxxxxxxx;
cout<<endl;
cout<<"======="<<endl;
cout<<"Average"<<endl;
cout<<"======="<<endl;
cout<<endl;
cout<<"how many values are you averaging? (max 20)"<<endl;
>>
>>56830090
That's more like "concrete" algebra. Abstract algebra doesn't really deal with elements of the group/ring like this.
>>
>>56841411
what I meant is that back then, you actually had to type out everything, so stuff was frequently abbreviated, which isn't great for understanding
>>
>>56830090
>>56845224
best example of practical abstract algebra is the floyd-warshall algorithm for shortest paths in graphs

it's directly and clearly the same as abstract matrix multiplication over the tropical algebra <+,*> = <min,+>
>>
File: macbook_scriptwriter.png (600KB, 1282x568px) Image search: [Google]
macbook_scriptwriter.png
600KB, 1282x568px
>>
template<class lhs, class rhs>
bool are_equal(lhs left, rhs right)
{
return left.operator==(right);
}

Am I doing this right, guys?
>>
>>56846041
>call by value
no
>>
File: YANDERE SIM.png (227KB, 560x279px) Image search: [Google]
YANDERE SIM.png
227KB, 560x279px
>>
File: yansim1.png (102KB, 828x801px) Image search: [Google]
yansim1.png
102KB, 828x801px
>>
File: yansim2.png (149KB, 828x801px) Image search: [Google]
yansim2.png
149KB, 828x801px
>>
File: 1472011966521.jpg (42KB, 400x636px) Image search: [Google]
1472011966521.jpg
42KB, 400x636px
>>56846556
>brown is darker than black
>>56846590
he clearly understands how && works, why is he not using it
>>
>>56846556
>>56846590
>>56846594
does that affect performance at runtime at all?
>>
>>56830181
Galois fields are abstract algebra.
>>
>>56846605
He's utilizing short circuit if statements. It's still terribly done, but theoretically it's fail faster because of it.
>>
>>56845748
I was gonna rail you for the near unreadable fuzzy screenshot but then
>Bluebook
It's a still from Ex Machina isn't it?
>>
>>56839868
It's one of the most famous ones.
>>
>>56846590
>>56846594
Kek
Did the guy open source his code?
>>
>>56830066
GALOIS FIELDS!!!!!!

Fun fact, Galois died in his early 30s in a pistol duel.
>>
>>56845730
Hey I work in tropical algebras, first time I've ever heard somebody outside of my office know what these are.
>>
File: 1294617235510.jpg (67KB, 432x288px) Image search: [Google]
1294617235510.jpg
67KB, 432x288px
>>56828787
>studio.h
>>
>>56829857
underrated
>>
>>56830019
Never fucking use Try Catch behavior, it's not a solution, even if it helps in your logic.

If there is a way without using Try then it's better because of performance.

I've been through hell and back rewriting an entire application some code monkey wrote for the company before I joined, the fucker used Try Catch in EVERYTHING, whenever there was an exception he couldn't solve and whenever there was any kind of logic to do either A or B depending if A is null or gives wrong input.

That shit was slow as fuck because of this, and hogged RAM like a motherfucker.

Only use Try for critical accesses, like connections and files, but even for that using is superior.
>>
>>56829028
These are made up, right? No one can unironically submit something like that.
>>
>>56852705
C/C++ tutor here, it was probably coded by an autist. But at least it works.
>>
>>56844579

I like this one.
>>
>>56829028
Don't you only need the last two statements?
>>
>>56845730
>>56849996
Is that like regular algebra with umbrella drinks?
>>
>>56846847
Yes.

>>56849557
He probably read some online tutorial on how to do decisions, and stopped short of switch.
Of course, every Unity dev I know does the same shit. Didn't even bother learning the language, just copy-pasted a bunch of tutorials and changed objects. That's why Unity games are infamous for memory leaks and shit like caching 2 GB of assets all at once.
>>
>>56830469
NO

We can still go dumber
>>
>>56846590
>>56846594

Not bad, it could have been worse, if you have to program 2^x number of binary outcomes this makes it easy to make sure you don't miss any.
>>
>>56837860
I know this fucking feel, man.
>>
>>56844579
>Jew++
>>
>>56837860
>modulo operator
>"code"
???
>>
File: 1472491011123.jpg (151KB, 685x1280px) Image search: [Google]
1472491011123.jpg
151KB, 685x1280px
>>56841371
ilyen nekem is van.legalább van mivel kitörölni amikor nincs kulapergamen itthon.
>>
>>56846556
>>56846590
>>56846594

Reminds me of the terrifying spaghetti code undertale apparently is
Thread posts: 147
Thread images: 35


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