Navigation: /b/ - Random [Archive] | Search | [Home]
RandomArchive logo

Show me your coding skills!

The stories and information posted here are artistic works of fiction and falsehood.
Only a fool would take anything posted here as fact.

>>
>>705004869
> 2016
> using goto this way
Get cancer faggot
>>
>>705004869
*Sees the goto statement used*
*Leaves thread*
>>
>gotos in an OOP lang

Make up your mind. Only (half logical) reason to ever use them is to break out of nested loops
>>
File: 802264064.jpg (58 KB, 490x653) Image search: [Google]
802264064.jpg
58 KB, 490x653
10 print "op is a faggot"
20 goto 10
>>
File: 1433190665123.jpg (82 KB, 502x674) Image search: [Google]
1433190665123.jpg
82 KB, 502x674
#include <stdio.h>

int main(char* argc, int argv) {
printf("OP IS A FAGGOT");

return 0;
}
>>
>>705005113
this
>>
File: 1445097056242.jpg (63 KB, 693x663) Image search: [Google]
1445097056242.jpg
63 KB, 693x663
print("Op Is A fAgGoT")
>>
File: 1445803872549.jpg (64 KB, 506x662) Image search: [Google]
1445803872549.jpg
64 KB, 506x662
>>
>>705004869
Is it possible to be a dynamic vs a static fag?
>>
File: stuff.jpg (245 KB, 1869x1067) Image search: [Google]
stuff.jpg
245 KB, 1869x1067
>>705004869
dont go easy on me.
>>
>>705006876
+5 for linux
+0.5 for python
>>
>>705006876
you disgust me
>>
>>705006876
what editor is that? emacs?
>>
>>705007083
its vim with default syntax highlighting.

>>705007010
but why :<

>>705007009
its software that only i use and doesn't need to be fast and has no GUI. why not python?

i wanted comments on the code not the rest lol.
>>
>>705006876
how do you get those colors for the bash?
>>
>>705006876
loonix, terminal editor, python
I like your style


>>705007083
>emacs
>editor
Pick one
>>
File: op.png (13 KB, 333x123) Image search: [Google]
op.png
13 KB, 333x123
>>705007335
>>
>>705007376
its done via the PS1 variable. put it in your .bashrc


this is my PS1:

# prompt format
PS1="\[\e[0;34m\]\T \[\e[0;33m\]\u\[\e[0;31m\]@\[\e[1;34m\]\h\[\e[0;31m\][\[\e[0;37m\]\w\[\e[0;31m\]]\[\e[0;36m\]"

but you can google PS1 generators and make your own.
>>
>>705007419
>I like your style

woot

still id like some comments on my coding. i wonder if im good sometimes.
>>
>>705007419
nice meme
>>
>>705007629
aight thanks
>>
>>705004869

if ($you == "gay") {
echo "you are gay";
}
>>
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
>>
File: cf.png (3 KB, 270x94) Image search: [Google]
cf.png
3 KB, 270x94
C? get with the time oldfags
>>
>>705007780
the colors above the prompt are done with back color codes in the script that outputs the "todo" list. google bash color codes.
>>
>>705007629
Have a look at ZSH. Either OhMyZSH or Prezto
>>
>>705004869
>coding skills
>goto
>coding skills
>>
>>705006876
Your comment style and single line ifs are not very Pythonic, but it's still nice looking code.

Keep up the good work
>>
>>705007884
C++? Have some Lua
print "Hello, person who uses a non-productivity oriented language/ecosystem"
>>
10 PRINT "OP IS A FAGGOT!"
20 GOTO 10
>>
>>705007884
My nigga. The guy who made all of our production C++ code before I started has using namespace std; in every class and it gives me cancer.
>>
File: asmdcrypt.png (73 KB, 1071x931) Image search: [Google]
asmdcrypt.png
73 KB, 1071x931
Learning me some x86 ASM. This opens files from a game I'm cracking and decrypts them. Here's a snippet.
>>
>>705007965
ive tried ZSH and the like.

im pretty old school when it comes to software, if it works dont fix, etc.

i still use screen lol.
>>
>>705008026
self taught so my style is probably shit. thanks for the input.
>>
>>705005270
kek
>>
>>705008082
I actually started with Lua when I was ten.
>>
p "ur a faget"
>>
I'm a beast at VBA nigga
>>
>>705008097
the entire namespace? using
using std::cout;
or something is excusable but the whole std namespace? why tho
>>
universal_server() ->
receive
{become, F} ->
F()
end.
>>
im like pro at notepad.exe
>>
>>705004869
#include<stdio.h>
int main()
{
while(1)
{
printf("op is a faggot\n");
}

return 0;
}
>>
File: 1473561185190.jpg (400 KB, 900x1200) Image search: [Google]
1473561185190.jpg
400 KB, 900x1200
>>705008115
Post full source. Tits for you.
>>
>>705008572
Shorter:
for(;;) printf("op is a faggot\n");
>>
File: 1469558136759.jpg (12 KB, 300x237) Image search: [Google]
1469558136759.jpg
12 KB, 300x237
>>705006876
>2016
>terminator
>>
>>705008651
ASM makes me consider suicide when i think of making anything close to complex.

>open file
>7 lines
>file size
>6 lines
>no mem mgmt

oh god please no
>>
File: ss+(2016-09-22+at+05.21.21).png (65 KB, 1464x837) Image search: [Google]
ss+(2016-09-22+at+05.21.21).png
65 KB, 1464x837
>>
>>705008824
whats wrong with it
>>
>>705007540
>implying coding is hard
>>
>>705008873
topLine, middleLine, bottomLine look like they should be final, and be in class scope and not in function scope. This seems to be for a game. Java was not designed for games, and notch is a moron.
>>
holy shit! that google link is a virus!
>>
>>705008873
you code OS?
>>
File: 1469980341909.jpg (314 KB, 949x1654) Image search: [Google]
1469980341909.jpg
314 KB, 949x1654
>>705008115
God's work
>>
>>705008908
the question is what's right. the only reason to use it is to be able to split windows into tiles, and tmux does that and more while allowing you to use a real terminal emulator
>>
(def isFaggot?
(fn [user]
(if
(= user OP)
true
true
)
)
)
>>
mov [(SRB.CDB) + 0],01Bh ; load/unload command
>>
>>705009043
>implying you're virgins
>>
File: Linux_hacker_interface.png (106 KB, 1024x768) Image search: [Google]
Linux_hacker_interface.png
106 KB, 1024x768
>>705004869
>>
>>705009284
>the question is what's right.
it emulates a terminal.

i use screen to split windows, lol.

does everything i need and supports transparency well. why would i change?

i learned linux like 15 years ago im so used to doing things the old way i really not going to bother learning new features for new software to do what i already do 2nd nature.
>>
>>705007884
>\n into cout
>>
>>705009444
nice wikipedia copypaste
>>
>>705009328
Fuck formatting
>(def isFaggot?
>>(fn [user]
>>>(if
>>>>(= user OP)
>>>>true
>>>>true
>>>)
>>)
>)
>>
File: autism.jpg (136 KB, 500x659) Image search: [Google]
autism.jpg
136 KB, 500x659
>>705009444
> haxker interface
WOah - are you a wizard?
>>
>>705009590
'\n' doesn't flush the buffer, which takes time.
>>
>>705009444
>hacker interface
>ls -la
>>
File: NintendoGameBoy1989010.jpg (35 KB, 400x517) Image search: [Google]
NintendoGameBoy1989010.jpg
35 KB, 400x517
Hey you codefags I'm trying to Unicast WOL UDP and haven't found a good script prefer PS
>>
>>705009604
so why not just return true for the function or make isFaggot a bool that is true?
u like wasting cycles bro?
>>
>>705004869
>goto
what is wrong with you?
>>
File: file.png (186 KB, 1893x924) Image search: [Google]
file.png
186 KB, 1893x924
>>705004869
my audio encoding service

>someone paid me for this steamy shit
>>
>>705009670
Retard, you don't see any output until buffer is flushed.
>>
>>705009833
aka it's done automatically by your smart compiler either way.


>>705009827
???? ffmpeg ????
>>
>>705009827
i hope steve balmer gives you aids and satella shits in your mothers mouth
>>
File: hax.jpg (146 KB, 1280x720) Image search: [Google]
hax.jpg
146 KB, 1280x720
I fucking own your pussies! I am great web hacker online!
>>
>>/g/
>>
File: dcryptfull.png (360 KB, 1050x5428) Image search: [Google]
dcryptfull.png
360 KB, 1050x5428
>>705008651
Here you go anon. I'm still learning so it may not be perfect.
>>
>>705004869
SELECT * FROM THIS.THREAD
WHERE FAGGOT = 'TRUE';

> Return 1 record
> Name = "OP"
>>
public bool FaggotDetector(int postId, int userId)
{
using(var db = new DatabaseContainer())
{
var post =
db.Posts.FirstOrDefault(p => p.Id == postId);

if(userId == post.CreatedBy)
return true;
}
return false;
}
>>
>>705009827
>>705009950

dbpoweramp

>they had a license and demanded i use it
shit was jokes, son
>>
>>705009995
"ah ah ah", "ah ah ah","ah ah ah".
good movie.
>>
>>705010093
lofl. ever hear of paste bin?
>>
File: gamoo.jpg (323 KB, 766x758) Image search: [Google]
gamoo.jpg
323 KB, 766x758
>>705004869
-[--->+<]>------.+.[----->++<]>.-[--->++<]>-.++++++++++.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.++[->+++<]>.-----.++++++..++++++++.+++++.
>>
>>705004869
Hello world :^)
>>
>>705009569
right, you learned linux 15 years ago and picked up terminator. cool bro
you can keep using your garbage and be happy with it, it doesn't make it any less garbage
>>
>>705010397
Ah good old brainfuck...
>>
/* TABS > SPACES */
>>
>>705010306
>code
>SQL commands

SELECT * FROM *.* WHERE NOT ISCODE;
>SQL
>>
@echo off
title OP's a fag
print I fucking hate the nigger OP
pause


I am the master at this! :D
>>
DROP TABLE USERS
>>
>>705010463
and im asking you to tell me what makes it garbage.
still waiting too.

boy is terminator triggers you id thought youd blow you lid about screen.
>>
>>705009995
>>705010560
use an orm you uncultured piece of shit
>>
>>705009053
a moron with a billion dollars tho
>>
>>705010657
>>705010463
also i used bash till like 5 years ago. then wanted transparency so i had to switch :D
>>
>>705010469
I'm glad someone got it.
>>
File: Who.png (55 KB, 534x344) Image search: [Google]
Who.png
55 KB, 534x344
BEAT THIS, FAGGOTS.

Protip: You can't.
>>
You want to see my coding skills?
I can hack your computer with a single link. Mouseover this:
>>>/v/352645161
>>
>>705010971
ya got me
>>
>>705010971
10/10
>>
>>705010971

Never seen this before. And I've been here for 8 years now.
>>
INSERT INTO Your.Mom
SELECT
Dick,
Dildo,
Broom
FROM Random.Shit
>>
>>705004869
This is me doing some MCMC code in Julia, fitting a model to some disease transmission data. I've included the likelihood calculation, and the graphs with parameter histograms and Beta/Gamma distributions best fits.

Normally a Linux user, but my monitor is blown so I'm using my work laptop.
>>
>>705010971
Fucking magic!
>>
>>705004869

public class FaggotChecker {

public static void main(String[] args) {

if (true){

String adjective = "faggot";

System.out.println( "OP is a massive " +adjective );
}
}
}
>>
>>705010971
how the fuck is this working
>>
>>705010971
based anon
>>
File: 1402724439563.jpg (114 KB, 367x384) Image search: [Google]
1402724439563.jpg
114 KB, 367x384
>>705010946
>Using assignment operator instead of equivalency operator.

0/10
>>
>>705011238
filth
>>
>>705011171
Me neither, and Ive been here since the late 70's
>>
>>705010374
>>705010093
Not sure why I thought you'd want to see a giant screenshot tbh.
Pastebin = Qcb9kZ8Y
Won't let me post the link, thinks it's spam.
>>
>>705010472
Wrong. Source code filesize doesn't matter anymore, editors handle space indentation of any desired width just as well as tabs, and you don't end up with two different whitespace characters in your file being used inconsistently.

>>705011357
>equivalency
It's called comparison operator
>>
>>705011238
nice fucking variable names i think i threw up a little.
>>
>>705004869
import java.util.Scanner;

public class Exercise_3_9
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);

System.out.print("Enter the first 9 digits of an ISBN as an integer: ");

int isbn = input.nextInt();

double d1 = isbn / Math.pow(10, 8);

int d2 = (isbn / Math.pow(10, 7)) % 10;

int d3 = (isbn / Math.pow(10, 6)) % 10;

int d4 = (isbn / Math.pow(10, 5)) % 10;

int d5 = (isbn / Math.pow(10, 4)) % 10;

int d6 = (isbn / Math.pow(10, 3)) % 10;

int d7 = (isbn / Math.pow(10, 2)) % 10;

int d8 = (isbn / 10) % 10;

int d9 = isbn % 10;

int d10 = (d1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5 + d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) % 11;

if (d10 == 10)
{
System.out.print("The ISBN-10 number is " + isbn + "X");
}
else
{
System.out.print("The ISBN-10 number is " + isbn + d10);
}
}
}

i have a little work to do but its almost finished
>>
File: hereyougo.gif (88 KB, 10000x10000) Image search: [Google]
hereyougo.gif
88 KB, 10000x10000
>>705010946
literally got cancer reading that.
>>
>>705010657
>>705010858
what the fuck are you talking about, bash is a shell and has nothing to do with transparency
terminator is a pile of shit clickfag features forked from gnome-terminal, I could go on from there but if you don't get it yet there is nothing I can do for you
>>
>>705011707
lol thanks asshole
>>
>>705010472
I agree. Tabs are great. If I want to change how my code looks, I just set the tabwidth the way I want it. With spaces you're stuck with how someone else wanted it.
>>
>>705004869
goto fuck you
>>
>>705010971
1337 hax0r
>>
>>705011622
I'm a mathematician. I use the variable names that match the way I write them on paper.

Plus I don't need to share my code, so I'm perfectly happy with things the way they are.
>>
>@echo off
>color 0A
>forfiles /M * /C "cmd /C if @isdir==FALSE if @ext==\"\" del @path"
>set /p url="Enter URL: "
>GOTO repeat

>:repeat
>wget -H -rc -nd -l2 -Di.4cdn.org -erobots=off -R *s.jpg %url%
>pause
>GOTO repeat
>>
>>705011737
sorry i meant xterm, bainfarted.

and i couldn't get xterm to go transparent with xcompmgr + transset using openbox so i just switched emulators.

terminator works perfectly for me so i guess i just like garbage software :D

thanks for pointing that out i guess.

>>705011964
fair enough, still triggers me.
>>
Been working on this for a while.
>>
While you guys are here, can you give me a good resource for learning Java?
>>
4qCg4qC64qCT4qCB4qCe4qCA4qCB4qCA4qC64qCB4qCO4qCe4qCR4qCA4qCV4qCL4qCA4qCe4qCK4qCN4qCR
>>
>>705012583

Youtube channel TheNewBoston
>>
>>705012583

tutorialspoint
>>
>>705012583
The Internet
>>
>>705012772
>TheNewBoston

That guy does a lot of shit. Great for learning some basic stuff.
>>
c000 ldx #$00
c002 lda $c010,x
c005 beq $c00e
c007 sta $0400,x
c00a inx
c00b jmp $c002
c00e rts
c00f nop

c010:0f 10 20 09 13 20 01 20 06 01 07 07 0f 14 00 00
>>
>>705004869
def main():
for i in range(1,1338):
print('You're a faggot nigger')
main()
>>
How do you choose between the dozens of coding languages, I want to start learning but what
>>
>>705012374
vim, nerdtree, I hope that's airline and not powerline. I like you.
>>
>>705012939
>>705012772

Derek Banas has higher quality / more mature content
>>
@echo off
:1
ping google.com -t -l 1024
goto 1

l33t h4x0r
>>
>>705005113
kek
>>
>>705012230
I'd write it as \epsilon_H H, which becomes eH*H in the code. I suppose I could write high_shedder_shedding_rate * num_high_shedders, but that takes up a lot more space and time to write, and can break up the flow.

Typically if you have complex equations (which you get in maths) you really want to avoid long variable names. Applications programmers probably shudder at the thought, but scientific programming is a very different environment.
>>
>>705013042
Java
period
>>
DO
PRINT "op is faggot"
LOOP
>>
>>705013042
It all depends on what you want to do
>inb4 "I wuna make gaymes"
>>
>>705007550
>char *
The fuck.... It's a char **
>>
>>705009444
kek
>>
>>705012995
> range(1,1338)
not
> range(1337)
>>
>>705013265
i get it, thats actually a good reason. im just saying it triggers me lol.
>>
>>705013494
And the arguments are in the wrong order
>>
>>705013042
First, you learn boolean logic operations
then, you learn transistor logic
then, you learn how to build functional units from logic gates
then, you learn CPU design
then, and only then, you learn assembly language
then, after you have mastered assembly language (not dabbled, but mastered it), you learn C
then, after you have mastered C, you may learn the higher-level languages of your choice, but you will always use C and assembly as your primary languages because everything else is unnecessary bloat.

Dont listen to this anon
>>705013288
Lest you want to be a code monkey throughout your existence and get paid in bananas
>>
>>705013042
If you want to learn to program, penalty JavaScript, because you can work on it and run it anywhere you can find a web browser.

If you really want to learn to program, then have a look though SICP (Structure and Interpretation of Computer Programs). Also look up the Abel and Sussman programming course on YouTube. It's from 1986, but everything they teach is valid stuff. They also use Scheme, which is a dialect of Lisp, the most amazing programming language ever made (Clojure is the most popular modern dialect).
>>
>>705011707
kek
mind if i save?
>>
>>705013848
-penalty + probably. Fucking phone autocorrect.
>>
File: fuck you op.png (3 KB, 441x168) Image search: [Google]
fuck you op.png
3 KB, 441x168
You're lucky I'm rendering a video and can't restart.
>>
>>705013848
>if you like high learning curves

is your not an acedemic maybe start with something little more basic than scheme and SICP, lol.

I like lisp but its unintuative as fuck till you get used to it.
>>
>>705013993
go ahead lol.
>>
>>705013756
mhm, maybe I should just an hero
>>
>>705013756
i want to learn how to code
>No, you first have to follow my lead and learn 10 different things before you can even touch that. How DARE you drive a car without being able to build a engine with your bare hands, amirite guys?

http://www.tiobe.com/tiobe-index//
>>
>>705005113
In my workplace, I see people use goto still, but only to go to error cleanup in C/C++.
>>
Anyone here has experience in finding work on the internet? I mostly tried freelancing websites like guru.com, I know a bit of android and java, but all of my offers are getting turned down.
Fucking subhuman indians working at $5/hour are taking most of the jobs. And I've seen some of the shit they write, it's complete trash. Yet people keep picking them for badly written software that will have to be either fixed or thrown out and rewritten later.
>>
>>705006340
guy on my team at work had to write assembly code to interact with a restful API over http. even had to support JSON objects
>>
>>705014290
he is trolling.
learn c if your smart learn python if your not.
>>
File: 20160922_192205.jpg (1 MB, 2988x5312) Image search: [Google]
20160922_192205.jpg
1 MB, 2988x5312
lets compare e-peens, almost 10" here.

pic related.
>>
>>705014653
Both are good to learn. I still use python to quickly make scripts to do little things.
>>
>>705014137
Heh, fair enough. It is an amazing language though, and been around since the 1950s (only Fortran is older).

I do think that JavaScript is a good idea to start with. Not that it's a good language, it's all kinds of horrible, but you can get stuff done in it, it runs pretty much everywhere, it's pretty fast, and you can share it with your friends easily, which is really important. It's like hanging round at a friend's house and programming games on their ZX Spectrum.
>>
File: Capture.png (8 KB, 783x245) Image search: [Google]
Capture.png
8 KB, 783x245
>>705004869
>>
>>705013061
Yep, airline. Good shit right there.
>>
>>705014605
Vote Trump. He is very clear about his H1 Visa policies. *assuming you are American
>>
>>705015074
That's nice, but you don't need a visa to work from India through the internet.
>>
File: download (2).jpg (12 KB, 284x178) Image search: [Google]
download (2).jpg
12 KB, 284x178
Beat that fags
>>
File: howtogetflags.png (140 KB, 1161x509) Image search: [Google]
howtogetflags.png
140 KB, 1161x509
>>
>>705015311
The absolute pinnacle of programming.
>>
>>705013848

What you mean ((()())()Lisp(((()()))))))())()()()())))
>>
>>705015708
im still waiting for a higher abstraction level.
>>
File: 723587235.png (32 KB, 897x801) Image search: [Google]
723587235.png
32 KB, 897x801
So uh, I made a cointoss thingy, and I want it in a GUI but I don't get how to run the code when the button is pressed, pls halp
>>
>>705015847
(No (like this)). It turns out that you often use about the same number of parentheses in Lisp as you do in C, it's just the notation is a little different. Also if you use Clojure, then the monotony is broken up with square brackets and curly braces.

The way Lisp uses the same structure for code and for data is why it's so powerful.
>>
File: _all.gif (87 KB, 16x11) Image search: [Google]
_all.gif
87 KB, 16x11
>>705015670
>>
>>705016867
>The way Lisp uses the same structure for code and for data is why it's so powerful.
yeah lisp is incredibly powerful. can do shit that would make an OO programmer's jaw drop.
>>
>>705017131
OO?
also if it's so powerful why doesn't everyone learn it?
>>
>>705017446
I don't even know what either Lisp or OO is,
but probably because it's not very user friendly.
>>
File: 1473903523691.gif (2 MB, 219x186) Image search: [Google]
1473903523691.gif
2 MB, 219x186
>>705008115
I like you.
>>
>>705017522
> user friendly
It's a whole new concept (functional programming). If you're interested I would suggest to read "Hackers and Painters", couple of essays by Paul Graham, actually makes you want to learn Lisp.
>>
>>705017446
object oriented.
and because it has a high learning curve, its compiled, unintuitive paradigm: data and code treated same and sort of unreadable until you get used to it due to it's syntax.
>>
>>705004869
print *, 'OP is a gaylord'
>>
>>705004869
wow I started this thread over 2 hours ago
>>
>>705008115
Wow, assembly isn't even that bad. In college I had it but we never used any INVOKE there and barely used any regular in memory variables, just purely registers. So in college it felt like assembly was MUCH harder. But this looks just like any other language.
>>
>>705017973
good thread
>>
>>705018035
Back in uni I had to learn 64k and 8086
>>
>>705017446
Was that a logical argument? Because it sounded like you said this: If being a trillionaire is so great, why doesn't everyone learn it?

Maybe it's too hard for everybody to learn.
>>
int i = 0;
while (i == 0)
{
 System.out.println("OP" + " is a faggot");
}
>>
Surprised to see this thread is still up.

I'm this fag
>>705011671

and, after taking a break and coming back, I still can't figure out how to remedy the errors I'm getting when compiling the code. I suspect it has to do with the sizes of the values, and the types of the values on which i'm doing operations. Could anyone help?
>>
>>705018154
>Was that a logical argument?
not him but it looks like a question to me, not an argument. the little squiggle above the period is a dead giveaway.
>>
>>705012772
my nigga
>>
>>705018338
what are you trying to combine isolated digits into a full number?
not into java and only glanced at it but if so just convert to strings, concatenate, convert back to int.
3 lines. done.
>>
So I've scratched the surface with Python, but I am very fucking retarded and can only get shit to work by copying from tutorial videos

What language should I choose?
I don't even know what I want to code
Web pages? Apps? idk
>>
>>705018633
or here is my seudo code structure if you want to do it the stupid way:

input_list = numbers
output = 0
counter = 1
for each num in numbers:
output += num * counter
counter = counter * 10
print output
>>
>>705018880
stay with python for now
>>
>>705018943
fuckin formatting....

input_list = numbers
output = 0
counter = 1
for each num in numbers {
output += num * counter
counter = counter * 10
}
print output
>>
>>705018880
install gentoo
>>
>>705009827
use fucking StringBuilder or string.Format don't add strings.. jesus christ
>>
class OPFaggot

public int postersInThread;
public string opIsFaggot;

public void Update(){

if (postersInThread >= 76){
opIsFaggot = true;
}
}

Yes i like c#. Cry my a river fags. It has been awhile tho.
>>
File: apple2.png (5 KB, 605x422) Image search: [Google]
apple2.png
5 KB, 605x422
>>
>>705018633
Sorry, I should have posted what the actual problem asks.

The program is supposed to take in the first 9 digits of an ISBN number and return the full number. The first 9 digits of ISBNs have to do with what country the book is published in, what publisher, stuff like that. The last digit is dependent on the first 9; the formula for d10 in the code
I'm not familiar with how to convert numeric literals into strings (I'm sure its easy we just haven't been taught yet in our intro class). Yes this is in Java. We have been taught casting, and based on the errors I'm getting i htink i have to use that technique here.
>>
how much math and logic have you guys studied? did it help you become a better programmer? is it worth learning category theory or lambda calculus?
>>
>>705019385
>casting
well you don't have to convert to a string since user input is string by default.
i dont know java but i bet the function for converting variables to an int is "int(x)". try google if it errors out.
dunno how to concat string in java but in python it looks like
>print str1 + srt2 +str3
or
> print "%s%s" % (str1, str2)
and in vb it looks like
>print "fuck" & "you"

>>705019385
i need to know how your getting the ISBN (user input? one line or input for each number)
also I need the formula for digit 10.

i can tell by looking at your code and not even reading it you should be using a loop by the 8 almost identical lines.
>>
>>705006876
dont really like the 'not end == 0' instead of just 'end != 0'

also personally wouldn't like your syntax highlighting coloring but each to their own, not bad anon
>>
File: OP_IS_A_FAGGOT.png (4 KB, 550x414) Image search: [Google]
OP_IS_A_FAGGOT.png
4 KB, 550x414
Am I cool yet?
>>
>>705018035
definitely wouldn't say it 'looks like any other language', especially when it comes to interfacing with any libraries or devices or anything, but its definitely not as bad as it used to be (still is on some systems)
>>
>>705004869
Prints the first 2^32 primes.
>>
>>705004869
$INVOLVE {standardinput.bat}

Run (print)
loop echo int
"fag is OP"
end kill load unload Static mem zoopdaloopshoop
>>
>>705017824
I'd argue that it's very intuitive (other than the whole (+ 1 2) thing). The problem is that it's so easy to do stuff, that everyone did their own thing, and on one ever standardised it. There's so much variation that it's hard to get into, and find good popular libraries.
>>
>>705020149
Yeah its user input. We haven't been taught loops yet either. Thats next section I think. Its common in the book to have to make programs one way, and then once we learn something new we'll have to do the program again but implement the new technique.
>>
>>705014952
I used to dislike javascript almost as much as objective-c, but over time I've grown to appreciate certain aspects of it, especially since there are some blindingly fast interpreters for it out there nowadays. If it weren't for some of the horrific type conversions I might even consider it a well designed language.
>>
>>705019815
Maths degree, applied maths msc, applied maths PhD. I wouldn't worry about category theory and lambda calculus, just get the hang of logic and flow first.
>>
>>705005270
my first program on c64
>>
>>705020648
why ULL, isn't int enough
>>
>>705020648
it prints all primes UP TO 2^32, not 2^32 primes
also there is no reason to not print in the first loop, you just want to look cool and not use any braces
>>
>>705020317
yeah i agree with you, don't know why i used not x==y instead. its pretty old code.

>>705020918
user input as a list or one line? whats the formula for the last digit?

>>705020743
lol this guy is a pro. i see i have a thing or two to learn yet.

>>705020865
deps on the lisp i guess. the whole polish notation, hard to glance at parenthesis nesting makes it harder for beginners.
if c is for the computer and python is for the user then lisp is for the compiler.

also a program problematically modifying itself is pretty neato.
>>
>>705004869
What gay fagget get good jon lel
>>
File: 1474512641826.png (1 MB, 1309x956) Image search: [Google]
1474512641826.png
1 MB, 1309x956
>>705020526
That shebang is fucking horrible
>>
>>705021069
Oh, and very little of that is useful for programming (other than practice for algorithms and big O notation, which are useful things to know). It's more the other way round that programming is useful for the maths!
>>
>>705021159
I'm working on making it generate more than 2^32 primes, and plus, int doesn't guarantee more than 16 bits.
>>
File: 14515999733990.jpg (235 KB, 1280x960) Image search: [Google]
14515999733990.jpg
235 KB, 1280x960
>>705021433
The fuck are you talking about? Why? Because it has the inactive cursor block on it?
>>
>>705020526
print 'top kek'
quit()
>>
>>705021428
>problematically
oops, mean programmatically
>>
>>705021387
Right, up to 2^32, and I print outside the loop because a previous version just dumped the array with a big write() call.
>>
>>705004869
Will post Arduino code for my Pokemon IV resetting robot if there is interest
>>
>>705021501
actually native int is int32 on 32-bit computers, and ull is uint64
>>
>>705020743
under. fucking. rated.

lost it on every line.
>>
>>705021829
It's int32 on 32 bit computers, but it's only guarenteed to be 16 bits. Who knows, somebody might want to compile my multi-gig-allocating code on a 16 bit computer.
>>
File: 1474513819822.gif (2 MB, 320x240) Image search: [Google]
1474513819822.gif
2 MB, 320x240
>>705021552
>#!/usr/bin/env python2
not
>bin/python2
>>
How the fuck can i find a stable IDE for C++ on linux mint that i can also customize the way i want it? Linux is cool and all but visual studio just demolishes everything else
>>
>>705022125
they will be unable probably, because unsigned long long is quite recent extension not found in newest compilers only. why not unsigned long? in will be uint32 on both
>>
File: consider_the_following.png (445 KB, 807x700) Image search: [Google]
consider_the_following.png
445 KB, 807x700
>>705022375
Kek. Your point?
>>
>>705022570
vi + gcc

bitch
>>
>>705022570
>visual studio just demolishes everything else
pretty much, yeah.

ive hears people get VS2010 to work with wine pretty well. i know a lot of versions cant be wined though.

like 6 years ago i tried and failed to wine it, now im 100% off windows and don't need c++.
VS is fast as fuck coding though. good software.
>>
>>705022570
kdevelop, qtcreator, code::blocks?
>>
>>705006340

Almost pissed with laughter. Thanks that's funny.
>>
>>705022950
all suck compared to VS.
ive used them all.
now i used vim. pic related. >>705006876
>>
>>705022597
>joke
Also the code needs more than 32 bits.
>>
>>705022570
>>705022914
Agreed. VS is a great IDE for C++.
>>
i used to script with PHP and then i realized PHP was shit and I'm shit so I stopped.

I made an IRC bot which was kinda neat. It has programmable modules for easily adding your own features like a command or AI or something. It's pretty much your run of the mill IRC bot with much less capability lol
>>
>>705023338
Yeah, PHP is terrible.
>>
>>705022950
Kdevelop gives me a bunch of error message boxes about some fucking manager, cant remember right now, on more versions that i tried, and codeblocks is actually pretty stable but when i want to put dark theme on it looks like someone threw cancer at the monitor, ill try qtcreator tho ty
>>
>>705023338
i also made this game using websockets with html5 and javascript/php. i lost it though when my hard drive broke :< never got to finish it
https://www.youtube.com/watch?v=6Aq7-tLXA-c

it had fully functional clipping and i was just getting ready to add combat after i had fixed the npcs. that video is an old prototype.

>>705023474
yup no hard feelings there. Took me a while to realize not only that but that I just am not interested enough in programming to actually take the time to learn something new.
>>
>>705023474
3rd this
>>
>>705023509
try wine man. kdev n qtc are run of the mill.

really nothing even comes close to VS's debugging.
>>
>>705023151
it really depends on habits. i never was a fan of vc, but can't use vim, it's too unconvinient for me, mostly because lack of good project management. it sucks when i need to quickly and frequintly jump between 300-500 source files in a set of subprojects
>>
>>705023863
i also had upgraded it to use canvas instead of the <img> tag i wish i had it still ;__; then i could port the server to another language and make a neat game out of it
>>
>>705004869
Oh no. Fucking JavaScript.

Fucking RIP
>>
>>705024046
>i never was a fan of vc
VS debuggin tho
>>
>>705024098
buds thats java
>>
>>705024028
Ok, thats the first thing ill try, is it as straight forward as to just install wine and the visual studio or do i need to fix some more stuff for compatibility?
>>
File: file.png (60 KB, 1436x180) Image search: [Google]
file.png
60 KB, 1436x180
>>705004869
I bet none of you homos can even explain the concept needed for the homework assignment I just completed, never mind write the program.
>>
>>705024518
>do my homework
>>
>>705024433
always check wineHQ before trying to use wine. saves you lots of time and headache.

https://appdb.winehq.org/objectManager.php?sClass=version&iId=22306

this is the VS version that people say works. there are caveats so read the link but nothing deal breaking.
>>
>>705024271
VS, sorry. and debug features are common to most ides
>>
>>705024518
>simulate the tree structure
Your assignment is to create the matrix?
>>
<?php

echo "Hello World!";

?>
>>
>>705024301
no it's not. looks like C# to me. Java doesn't have namespaces, it uses packages.
>>
>>705024623
>implying I need your help
>implying I would ever cheat myself out of learning or testing myself
>implying that you can even even wrap your mind around it.

>>705024696
Oh shit, the assignment nuked your mind.
>>
>>705024748
oh shit you're right lmao
>>
(void) op_fag(void)
{
printf("hey op");
wait_ms(4000);
printf("you'r a fag");
}
>>
>>705024681
>debug features are common to most ides
are you kidding me? did you acutally use VS?

i guess its been a few years since i messed with IDE maybe kdev and qct have gotten up to scratch since then idk.
>>
>>705024720
closing tags are bad in php. there is a chance a whitespace character could be returned thus sending headers early and breaking your shitty fucking php script
>>
>>705024793
>I would ever cheat myself out of learning or testing myself
top kek
>>
>>705024433
>>705024680
do not do this
>>
java is too easy dude...
>>
>>705024944
Reason?
>>
>>705024433
wouldn't it make a bit more sense to install VS though VirtualBox or another emulator?
>>
>>705024793

what kind of school gave you this homework, just curious
>>
>>705025110
I just gave a reason
>>
>>705024518
sudo code:

width = user_input("width")
depth = user_input("depth")

for x in width{
for y in depth{
mkdir(str(x) + str(y))
}
}

oh my god so complicated.
>>
>>705024518
this sounds like a fairly introductory homework assignment.
>>
>>705024901
i can't figure out what you need so much which don't exist in other ides... you can trace, set a bp, see vars and evaluate. what do you need more for everyday use?
>>
>>705025193
hey faggot, it's pseudo not sudo
>>
>>705025193
>sudo code
>wrong
>>
>>705024518
>sophomore computer science
>>
>>705025132
yes. but its slow in VS.

virtual machine != emulator BTW.
Thread replies: 276
Thread images: 42


Navigation: /b/ - Random [Archive] | Search | [Home]
Navigation: /b/ - Random [Archive] | Search | [Home]


If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoins at 1516QPvvjaBRziqhWPPJLvTaYxfUSBJswe
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.