[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/DPT/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 33
File: tumblr_ndpoo5g7561scohbgo8_500.png (146 KB, 447x520) Image search: [Google]
tumblr_ndpoo5g7561scohbgo8_500.png
146 KB, 447x520
What are you working on /g/?
Last thread >>53558609
>>
first for girls with penises
>>
How do you document your programs /g/?
-Man pages?
--Automatic or manual?
-Texinfo/(La)TeX?
-Comments on C headers or functions?
-HTML (eww)
-Doxygen?
>>
Working on my file server. Almost got the basis working. Next up is writing a simple web UI.
I understand this is not /wdg/, but is there something like Bootstrap that makes a website automagically scale for phone and desktop? I don't want to rely on JS btw.
>>
>>53569918
Comments + doctools
>>
>>53569918
For C++ I use Doxygen, which can generate man pages, HTML, and LaTeX. I use doctools for Python projects.
>>
>>53569918
HTML. Every platform my stuff works on has a web browser, so HTML it is. Sometimes I convert Markdown to HTML, but ultimately it's the same thing.

Manpages, texinfo, etc. are ancient at this point and require programs that might not always be even installed (I'm not always sitting in front of a Unix machine). HTML works every time and I can even use images.
>>
>>53570009
You can output html with texinfo.
>>
Is UML actually useful to know or is it just a giant meme?
>>
>>53570140
Only if you're working in a large team.
>>
>>53570166
Would you say that it makes sense to learn UML in your first year of a CS degree before even getting decent programming classes that go beyond for-loops?
>>
>>53570140
Giant ruse
>>
File: white.png (778 KB, 1270x683) Image search: [Google]
white.png
778 KB, 1270x683
>>53570195
Fuck no, not for a CS degree.
Maybe, just maybe, for a code monkey degree.
>>
http://pastebin.com/BU3HWtxK
I'm just trying to create a class to store my regexes so I can pass in a line, check it against all the regexes, and then run a callback on whichever one succeeds. But I'm getting the strangest results from valgrind http://pastebin.com/RB8PKHuN.
It looks like it allocates the regexjob on in the push_back and then immediately deallocates it? I'm sure I'm just misunderstanding the use of references.
>>
>>53570195
It is never useful. It barely gives any information at all

I wouldn't teach UML in any year of CS. I never saw a company using UMLs.
>>
>>53570212
Then I guess the CS course I followed for a year really was deeply flawed. I should warn people against it.
>>
>>53570195
No. UML is a nice to have skill.
>>
>>53570226
I hoped that was a theoretical question. If they are teaching UML to first years, your department must suck hard.
>>
File: 1457903809526.png (2 MB, 6925x8708) Image search: [Google]
1457903809526.png
2 MB, 6925x8708
I am planing on implementing a posix/perl regex engine. How would I go about it? Any tips?
>>
>>53570226
What uni?
>>
>>53570254
>tfw you fell for the degree meme
I got UML in my first year.
We were forced to write all kinds of UML diagrams before starting a project.
>>
>>53570254
My uni did UML first year, but it was more like, "hey guys, this is a thing that exists". We technically had to do some diagrams in the labs but the TA's clearly gave zero fucks about it.
>>
File: IMG_0070.jpg (116 KB, 1024x768) Image search: [Google]
IMG_0070.jpg
116 KB, 1024x768
Node package express says port 3000 is already in use, but it isn't and it used to work fine. Anyone know what's wrong? On Windows btw.
>>
>>53570310
>>53570281
>>
>>53570254
>I hoped that was a theoretical question
Nope, we also got a class about marketing and I remember one teacher saying "we're not going to teach you how to become good programmers, we're going to teach you how to design good software". That's when I started feeling like something was up.
I changed majors to EE and at least I'm getting proper programming classes now.
>>53570281
Rotterdam University of Applied Sciences or Hogeschool Rotterdam in my language.
>>
>>53570429
Was it CS? Because this doesn't sound like a CS degree at all. More like a Pajeet SE degree.
>>
>>53570420
InHolland in The Netherlands. That's where I got my bachelors degree. I don't know if that makes it a uni or not. I could get my masters degree if I spend 1 year at uni though but CBA.
Dutch education is a complete fucking joke.
>>
I don't know what the fuck I'm doing wrong.

HappyHolocaust file:
http://pastebin.com/aLin9NJN

IntroLoop file:
http://pastebin.com/rXGEzbnx

For some reason whenever I try even mention that there might be something called introStage() in the IntroLoop file, python throws a hissy fit and crashes. I cannot figure out what I've done wrong. This same method has worked for me plenty of times outside of pygame.
>>
File: meme.png (674 KB, 6925x8708) Image search: [Google]
meme.png
674 KB, 6925x8708
>>53570273
your png is now optimized
>>
>>53570499
Did you use optipng? Did you use any lossy options?
>>
>>53570517
>Did you use optipng?
no
>Did you use any lossy options?
dunno
>>
File: 1457749446272.jpg (236 KB, 1200x1200) Image search: [Google]
1457749446272.jpg
236 KB, 1200x1200
What's the best vector file format and why is it Postscript?
>>
>>53569788
python 3.4
I am building a python program that will search through multiple files for a word and return the count. Hoping to add tkinter GUI to call the function up but we'll see. In the end if it works out I'll give the same tool to some of the folks in the office.
>no I do not want to switch languages or argue about shit
http://musicforprogramming.net/?one
cool site btw. generic domain but not bad beats
Happy to share some of the code.
Mind you I am intro level so I am still getting adjusted to shit like github.
If anyone has a way to open multiple files with the built in open function that would be cool.
>>
>>53570462
Well I thought it was CS and during open days I got the impression that it was CS but all I got was disappointment.
The projects we had to do did involve plenty of programming but the teachers who guided us were communications graduates who only cared about documentation and how it all looked and couldn't help us at all with any programming questions we had.
>>
File: why.jpg (19 KB, 220x219) Image search: [Google]
why.jpg
19 KB, 220x219
>>53570548
>and couldn't help us at all with any programming questions we had.
>>
>>53569788
Man, I really need to read/watch assclass
>>
>>53570548
InHolland Dutchfag here.
I had exactly the same. We were dicking around with an EasyPIC and ran into some issue. Our professor claimed that the following piece of code was causing the trouble:
...
i++;
...

So he changed it to:
...
i = i + 1;
...

AFAIK the genius is still prowling around uni.
>>
have you read your R5RS today
>>
>>53570540
I am this guy here
>>53570604
Dutch guy, what is EasyPIC?
>inb4 I google it and get ten page explanation of neat shit but no explanation and a wiki on its history
>>
File: 1426548231392.png (141 KB, 800x600) Image search: [Google]
1426548231392.png
141 KB, 800x600
higher education is mostly a scam except for things that really require it like becoming a licensed medical professional

every once in a while we get butthurt csfags bawwing in /dpt/ about how shit their education is/was

no one can spoonfeed you into becoming a good programmer anyway
>>
File: 012.png (217 KB, 899x1300) Image search: [Google]
012.png
217 KB, 899x1300
>>53570587
Indeed
>>
File: ss+(2016-03-19+at+03.43.23).jpg (38 KB, 574x489) Image search: [Google]
ss+(2016-03-19+at+03.43.23).jpg
38 KB, 574x489
>>53570604
>mfw
>>
>>53570498
I am this guy here.
Please help I am incapable of independent thought. My searches on stack overflow and through the documentation have led me to no avail.
>>
>>53570630
>http://www.mikroe.com/easypic/v6/
It's basically a super sized Ardruino programmable in C. Pretty fun tbqf.
>>
>>53570641
>famous university
Guaranteed job. Even if it teaches you nothing, the reward of having a high paying job is enough.

>programmer
Programming != CS. Indeed, if you want to become a programmer do not go to uni, but if you want to become a computer scientist, you should.
>>
>>53570648
some languages don't have increment operators though, that is an acceptable code in such languages
>>
>>53570630
It seems to be a programmer board for a PIC microcontroller. It's something I'd expect to see at an EE degree rather than CS 2bh.
>>
File: diff.png (2 MB, 6925x8708) Image search: [Google]
diff.png
2 MB, 6925x8708
>>53570499
>>
>>53570667
>some languages don't have increment operators though
Except if you are talking about a language with immutable variables, I wouldn't use it.
It should at least have i += 1.
>>
>>53570667
The compiler did support increment/decrement operators. The brain of the professor didn't.
>>
>>53570677
what?
>>
>>53570677
How did you make it?
>>
>>53570677
except you don't see the difference in naked eye.
so it doesn't matter
>>
>>53570648
I use I += 1 all the time
>>
>>53570709
then just use loss format
>>
>>53570498
>http://pastebin.com/aLin9NJN
>>53570652
lol, hey man we need to know what version of python you are using. I want to assume 3.5 but you never know?
so I see introloop and introstage. Are those built into python's pygame library or are you just calling those up out of your ass?

If they aren't built in then you need to call them.
>>
>>53570726
could you see the difference without using diff tools?

no? that's what i thought
>>
>>53570709
>>53570753
>>
>>53570747
>call them
SHIT
I mean define them.
Define the function or class you are trying to call.

ie fucking
define introStage():
manipulate my variables here
[/code}
my other guess is that you need to RTFM for whatever version of python you got. run the documentation server.
>>
>>53570753
then just use loss format
>>
How do template enumareted value checking when the class has several different enumareted fields?
>>
>>53570747
>>53570798
The code for IntroLoop is the other pastebin link. I defined the introStage() inside of the file, but it just tells me that introStage() doesn't exist. Using 3.5
>>
>>53569918
godoc is love, godoc is life
the botnet crawls your repos, hosts your doc and does it for free.
https://godoc.org/github.com/gorilla/websocket
>>
>>53570805
could you see the difference without using diff tools?

no? that's what i thought
>>
>>53570862
Why not just use a loss format you fucking braindead retard?
And see >>53570781
faggot
>>
>>53570498
>>53570823
Gotchya. Alright. Welp.
Sounds like we don't understand the problem. Take a screenshot of the runtime error and post from your environment. You're sure that all the code is in the right place?

Another thing I would try...
Try calling something else from a separate script that imports IntroLoop. You know what I mean? Determine if that is even working as you intended.
>>
>>53570877
no
>>
>>53570909
Stop namefagging, retard.
>>
>>53570909
Okay, so removing the "import HappyHolocaust" from IntroLoop seemed to make things work using a simple print function, however now I can't access the constants I need from the main file in the introStage() function
>>
Hush little baby don't say a word
Mommy's gonna buy you a unix nerd.
If that unix nerd can't hack,
Mommy's gonna buy you a Graybar rack.
If that Graybar rack gets full,
Mommy's gonna send it to /dev/null.
If /dev/null ain't read/write,
Mommy's gonna change-own it tonight.
If that change-own isn't done by root,
Mommy's gonna buy you an OS to boot.
If that OS dumps core & crashes,
Mommy's gonna write a shell script that hashes.
If that shell script is written in c,
Mommy's gonna kill that PID.
If that PID just won't die
Then mommy's gonna start to cry.
Even if she has a nervous breakdown,
You'll still be the sweetest little girl in town.

Written by: Kristin D. Thompson
>>
>>53571049
THIS ISN'T CODE
>>
>>53571049
>not using kill -9
>>
File: 1458398800568(1).png (756 KB, 6925x8708) Image search: [Google]
1458398800568(1).png
756 KB, 6925x8708
>>53570677
[b][i][u][o]OPTIMIZED[/o][/u][/b][/i]
>>
>>53569918
Comments in headers and source.
Man pages if your project is important enough.
>>
File: diff_diff.png (2 MB, 6925x8708) Image search: [Google]
diff_diff.png
2 MB, 6925x8708
>>53571114
>>
>>53571170
What program do you use to do this?
>>
>>53571179
Gimp
>>
>>53571179
IM
>>
>>53571193
>>53571207
How?
>>
>>53571218
How come?
>>
>>53570709
>>53570753
>>53570912
kill yourself retard
>>
>>53571641
Report and ignore.
>>
Starting to regret going into CE. Senior. CS is just more interesting than control systems and digital signal processing.
>>
>>53571736
>CS is just more interesting than control systems and digital signal processing.
No it isn't
>>
>>53571736
My uni has digital signal processing in CS.

>>53571748
It is.
>>
>>53571748
To me, it is. Going through some abstract algebra (Garrett's abstract algebra) and compiler theory (dragon book) on my own and it beats the fuck out of stochastics (stats/prob) and the hell that is FPGA programming.
>>
>>53571803
You might have more luck posting more grills. I can't guarantee it, but it won't hurt
>>
>>53571803
haha, if someone reported you'd be banned forever for posting child models
>>
>>53571965
Isn't that allowed here? It's a picture of a girl, and it is not NSFW. I can't see anything in the rules that I'm infringing. Would you care to point me to the rule please?
>>
>>53569788
any haskell fags here?
any nice programs you've made with haskell
what libraries are worth learning
is it possible to get a job that uses functional programming?
>>
>>53571989
its not
I remember someone telling me how they posted laura b from cd and got banned. it was just her face too
mods are cucks, but still, its better to delete that post now in case some java fag reports you
>>
>>53571989
you can't post child models no matter what
see, some pictures of child models may be illegal, so its outright ok to ban the entire thing
i know it doesn't follow, but they're the mods, ok
>>
File: aw03_000.png (2 MB, 2935x1200) Image search: [Google]
aw03_000.png
2 MB, 2935x1200
>>53572009
>>53572053
Okay, thanks for the heads up. I deleted it.

Here's a replacement pic.
>>
File: tehlisp.png (264 KB, 447x520) Image search: [Google]
tehlisp.png
264 KB, 447x520
>>53569788
ftfy
>>
>>53569918
I try to make it as self commenting as possible by breaking down into small named functions that describe what they do
Maybe 1-2 lines per function in a header file to describe what it does, what it takes in, and what it outputs, but that's about it
>>
>>53572094
Did some looking into it because I didn't recognise it. The character is 誒.

It's not used in Japanese. OP's post is from a chinese translation.
>>
>>53572121
Probably anyway, I don't know, the author of assassination classroom could have a thing for weird kanji for all I know.
>>
>>53572117
wat
>>
>>53572117
what is this amateur bullcrap?
>>
>>53572138
Do you not understand self-commenting code or something?
Write it so that you don't need some big document to tell people what you're doing
>>
>>53572153
It was a misquote, I meant to reply to >>53572109
>>
>>53572117
TL;DR too lazy to write proper docs.
>>
>>53572153
Self documenting code will at best explain what your code does. It won't explain why you wrote it in the first place.
>>
>>53572121
Thank you! I searched for the components on jisho (矢, 厶) but didn't see it.

And Jisho has it but not under any parts: http://jisho.org/search/%E8%AA%92%20%23kanji

http://cjjc.weblio.jp/content/%E8%AA%92

I don't think the author of the manga would have used it. I might download the raw and have a look through.

Thanks again.
>>
>>53572151
Why add an extra 100 lines of code worth of comments or an extra document if any person reading your code can just figure out what you're doing without it anyways?

It works for the Linux kernel
>>
>>53572117
if you do it incorrectly you could easily end up with tightly coupled spaghetti code where the reader has to jump back and forth just to get a grasp of what your code is doing
>>
>>53572222
Nice quads

Documentation isn't just about commenting the odd function here and there
>>
>>53572230
I don't think I need to tell people what checkarguments() does or what mainalgorith() is there for

Jesus, I said what I did and why I believe in it, guess I should know better than to give and opinion around dogmatic and autistic trannies
>>
File: 1439768280450-0.jpg (106 KB, 364x457) Image search: [Google]
1439768280450-0.jpg
106 KB, 364x457
Has any of you ever read a webdev book? Terms like "WordPress gurus" and "ninja code" are widely accepted.
Who are these people, why do they do these things? treating coding like it's some kind of fucking magic, third graders can code simple fucking functions for the love of satan. Jesus fucking christ it's fucking disgusting
>>
>>53572302
To be fair, you seem to have misunderstood the original question. Yeah it's normal to comment on your functions, but the question was about the general documentation for the entire software you make
>>
File: 0 122.jpg (688 KB, 898x1403) Image search: [Google]
0 122.jpg
688 KB, 898x1403
>>53572218
I was right, It's a chinese translation, here's the page from the raw.
>>
>>53572368
Thanks :3
>>
File: just sayaka.png (175 KB, 512x512) Image search: [Google]
just sayaka.png
175 KB, 512x512
>>53571991
>any haskell fags here?
Yes, not many as of lately though, I perceive.
>any nice programs you've made with haskell
There have been some. One I clearly remember to have had fun with was a Gopher client and server. I've written a few toy languages as well, currently "working" on a dependently-typed one.
>what libraries are worth learning
Learn the base first and make sure you know what functionality and structures it offers. There are many great libraries, but many of them are also difficult to grasp from the bottom up if you want to use them efficiently, too. For instance, lens is one such.
Do you have any specific area of application in mind?
>is it possible to get a job that uses functional programming?
Yes, definitely. At the moment, it's big in finance and fields with high-assurance applications (aerospace engineering), but it seems to be gaining popularity in other fields as well with languages like OCaml, Elixir, Coq etc.
>>
>>53571991
Here.
>any nice programs you've made with haskell
A few, but my favorite is a platform that scrapes 4chan, persists it to postgres. Then we are free to analyze meme patterns over time, find new memes before they surface, etc. It even has a shitpost generator.
>what libraries are worth learning
depends on what you want to do, but parsec is a common suggestion for advanced users who want to write compilers. beginners should focus on the standard libs.
>is it possible to get a job that uses functional programming?
absolutely, I see adds for Haskell jobs every few months and write Scala at my current job.
>>
babby here.

How do I split a thing into a dictionary.

Say I want to,
i.split('-'), get in into key, one into value.
>>
>>53572399
fuuzetsu?
>>
>>53572307
webdevs are stupid as hell and lack morals
>>
Can some one recommend me some good python beginner projects?
>>
>>53572368
Ok, whats the context in that first panel?
>>
>>53572473
building a virtual machine following the architecture spec at challenge.synacor.com (don't use an actual e-mail to get the files)
>>
>>53572478
It's about her mother controlling her life like a game.
>>
>>53572473
Make a program that plays hexapawn and always wins
>>
>>53572426
No, although I miss him too. I haven't been visiting /g/ regularly for the past few months, as it's just become consumerism general and the DPTs are shit as well, but I think he posted in one a few months back.
>>
File: 1458148532256.jpg (87 KB, 511x610) Image search: [Google]
1458148532256.jpg
87 KB, 511x610
currently learning C coming from Java background. I wanna switch because I'm starting to hate OOP more and more. I never really got it. I could never really think in terms of objects and polimorfism and Java my code is an unmaintainable mess. the only things I get right is representing the problem by model classes and functions. I also really like Java lambdas and streams.
>>
>>53572473
Make a program that generates a sudoku board, erases some of it, and asks the user to solve it
>>
Working on my torrent tracker. I have a working iteration: fully supports serving peer ips/ports from the torrent info_hash, but I need to add a lot of stuff still: Peer tracking via SQL (probably going to use MySQL) so that tracker sites could track user info, torrent-client whitelisting and blacklisting and a host of other little nice-to-haves.

Implementing it in Go and it's been a very enjoyable project to learn the language in.
>>
>>53572580
Why not C++ then? You can have lambdas and streams (and a bunch of other nice features) that will feel like home and you won't have to use OOP because it's not enforced.
>>
>>53572632
Post code.
>>
>>53572691
No.
>>
>>53572697
Ok.
>>
>>53572580
Your problem is you need to think about designing a consistent and clean API for your classes. My guess is you stuffed everything under the sun into your model classes.
>>
>>53572691
https://github.com/GrappigPanda/notorious
>>
>>53572580

>ballmers_peak.jpg
>>
>>53572679
Not him, but I feel people forget that C++ isn't just C with classes. C is more portable, compiles differently, the current version has added functionality not in C++, and other languages interact more cleanly with C
>>
>>53572413
up!
>>
>>53572679
OOP is not enforced but the chances are every C++ project would have a lot of OO code you have to interact with. I'll definitely check out the C++11 features though
>>
>>53572580
Try OCaml or SML. It's the C of functional languages.
>>
>>53572837
This.

Even when your not using classes, C++ tends to look quite a bit different from C.
>>
>>53569918
Javadocs
>>
>>53572947
>Java
lmao
>>
>>53572722
my model classes are usually just POJOs but yeah, my code usually suffers from a bad designed APIs. I always know that what I'm writing is bad and I will have a lot of problems working with it, I just can't design it better
>>
Writting something for Japanese audiences so..
I'm converting ~1600 lines of code from JavaScript canvas to ActionScript3 because I don't want my code to be stolen and I have no clue what kind of retarded/backwards browsers Japanese people have...
>>
Why has no one made a /dpt/ app yet that just quickly opens /dpt/ and let's you shitpost?
>>
File: u3fX8Tk.png (2 MB, 1920x1080) Image search: [Google]
u3fX8Tk.png
2 MB, 1920x1080
Anyone here do bitcoin dev? What's the best bitcoin api to use for backend stuff?
>>
>>53573029
Clover?
>>
>>53573024
Consider harakiri.
>>
>>53573102
Will do, thanks for the rec.
>>
>>53573024
>I don't want my code to be stolen.

Just minify it and get over it. Your code can always be stolen if they try hard enough. And chances are, nobody wants your shitty code anyway.

Also Japanese people use the same browsers as everyone else. If your target audience is people who are computer literate you can plan for firefox/chrome. If you want it to work on all computers expect IE11.
>>
>>53573043
what are you even supposed to do with it
>>
>>53573074
Too many clicks. I want one that automatically fetches the latest /dpt/
>>
Nodejs feels so damn bothersome to dev with
>>
>>53573156
>>53573203
>>>/g/wdg
>>
learning javascript for my new job

not gonna lie, even though it's javascript, it's refreshing picking up something new and having it work in a different environment. I'm glad other people are doing the design part
>>
I enjoy deploying and programming but I hate learning the technology(frameworks and languages) before I can do so
Feels like torture learning all these tools
>>
>>53573156
Tempted to agree. I had it in my mind that the Japanese are in love with .swf, but it seems like most of their modern devices are in line with N.American standards.

>>53573222
It's not a webdev question, it's a national compatibility question. Browsers are a good way to get people to use your applications regardless of where they live and etc.
>>
>>53573300
don't learn new languages and meme frameworks unless you have to. specialize in one or two languages
>>
>>53573334
the question is literally about which WEB browsers nips use. it's only a concern for web devs
>>
>>53573338
In the real world, you will have to learn a variety of frameworks and languages, and keep up to date with new ones, as well as keeping up with various other non-programming tools like database design, etc
>>
>>53573371
yeah if you're literally a web dev or a CRUDmonkey
>>
>>53573388
Nope, even in other dev areas like application development
>>
>>53573401
ok FAG
>>
>>53573410
no problem mate
>>
>>53573427
there is no way you HAVE to learn garbage like js and as3 unless you're a fucking web dev or a literal fag indie hipster startup dev, and even then it's still possible to specialize, there is no rule stating that you have to be a jack of all trades
>>
>>53573456
That's a cool and obvious comment, except for the whole "learning a variety of tools means you're a jack of all trades". Very unrelated, but maybe you misquoted
>>
>>53573471
someone with e.g. 10 years of experience in C++ is obviously more suited for C++ dev than a webcuck who barely learned 20 different flavor of the month frameworks
>>
>>53573499
I don't know why you misquoted again, unless you actually think learning various tools is specifically only for webdevs, and that a programming job entails only learning a language.
>>
>>53573519
yeah whatever fag
>>
>>53573530
no problem mate
>>
>>53573547
fag...
>>
>>53573564
yeah mate?
>>
isn't this the same loop ?

for (int a = 10; i != 0; i--)
and

for (int a = 10; i >= 0; i--)
>>
Working with python.
Is it really important to keep that maximum of 80 characters per line rule?
Sometimes I need to save something to a DB so the line end up like this
DB(("INSERT INTO blahblahblah (ffffff, xxxxx, jjjjjj, kkkkkk, yyyyy) VALUES (?, ?, ?, ?, ?) WHERE wwww = 666999")


What am I doing wrong? I know it must be wrong
>>
>>53573601
no, the second one goes to 0 inclusive
>>
>>53573601
i = 0 is the same as i != 0

sure thing.
>>
>>53573601
The first one is more error prone. If you decrement a by 2 on the last iteration, your loop will run forever.
>>
>>53573621
in PEP-8 it's a maximum of 79 characters per line

but just write whatever because python looks like shit no matter what

or just stop using fucking cancerous python
>>
>>53573621
"INSERT INTO blahblahblah
(ffffff, xxxxx, jjjjjj, kkkkkk, yyyyy)
VALUES
(?, ?, ?, ?, ?)
WHERE
wwww = 666999"


:^) Also use SQLAlchemy you fucking autist.
>>
>>53573007
Effective Java, 2nd ed
>>
File: 1389615352982.jpg (48 KB, 535x577) Image search: [Google]
1389615352982.jpg
48 KB, 535x577
>tfw no brogrammer buddies to commit to sjwhub with
>>
Does anyone know what's the status of Ocaml multicore?
>>
File: Untitled.png (3 KB, 348x148) Image search: [Google]
Untitled.png
3 KB, 348x148
>>53573811
>tfw only contribute to low profile projects, wish I could contribute to more popular ones but they seem overwhelming
>>
>>53569788
Stop this programming trap meme.
>>
>>53573812
not as multicore as your mom
>>
>>53573882
She is not a trap you faggot.
>>
File: 0replies.jpg (25 KB, 221x221) Image search: [Google]
0replies.jpg
25 KB, 221x221
>>53570273
>>
>>53573939
>>53570273
You write a test suite.
You write a regexp tokenizer/compiler to DFA.
You write DFA interpreter.
Optional step: use some JIT library to compile DFA to native code.

that s-should cover it.
>>
>>53573939
>>
Reminder that you should use std::unique_ptr<T []> to pass around dynamic arrays that don't need to be resized, NOT vectors.
>>
>>53572975
What's so funny?
>>
>>53574020
Java
>>
>>53574020
Java
>>
>>53574028
What's not to love?
>>
>>53574049
lmao
>>
>>53574020
Java

>>53574049
Java
>>
>>53574020
Java
>>
>>53574049
Java
>>
Java is beautiful and elegant.
>>
>>53574094
lmao
>>
File: 1337772490866.gif (2 MB, 300x277) Image search: [Google]
1337772490866.gif
2 MB, 300x277
>>53573973
>perl regex
>DFA
>>
>>53574116
You have to start from the basics, anon.
>>
File: 1310483412100.jpg (34 KB, 413x395) Image search: [Google]
1310483412100.jpg
34 KB, 413x395
Reminder that:
*Java is the most popular language in the world
*Has the best tooling
*Has the best IDEs, and the best selection
*Has the fastest frameworks
*Java is effortlessly cross platform
*Isn't Windows only like C#
*Isn't dangerous like C
*Isn't a mess like C++
*Isn't slow like Python and Javascript
*Isn't meme like any other language
>>
File: minervasowl1.jpg (736 KB, 994x1382) Image search: [Google]
minervasowl1.jpg
736 KB, 994x1382
>>53574135
That I can agree with.
>>
>>53574020
Posting Java
>>
>>53574154
lmao
>>
>>53574154
>javascript
>slow
lmao try harder
>>
>>53574186
It's pretty slow compared to Java t b h f a m
>>
>>53574154
>*Java is the most popular language in the world
Popular things tend to be shit (ex: windows)

>*Has the best IDEs, and the best selection
Emacs works on just about every language

>*Has the fastest frameworks
Slower than C and tons of other languages

>*Java is effortlessly cross platform
Like most languages

>*Isn't dangerous like C
Java is just as dangerous as C, maybe more.

>*Isn't slow like Python and Javascript
A language can't be slow, an implementation can.

>*Isn't meme like any other language
It is an enterprise meme.
>>
>>53574154
*Takes on average more lines to code
*Creator hates OO
*Not as good as C
>>
>>53574154
Java is the original meme language. Its syntax is shit and it's slow garbage.
>BUT MAH BENCHMARKS
It's fast enough for simple things but the more complex a program is, the more it shows its bloat and slowness vs. other languages.

>C#
Not Windows only
>C dangerous
Learn to program, kid.
>>
>>53574196
Nope.
>>
Where's the best place to get some of those challenges? Gotta start small tho.
>>
>>53574216
This
C# is shit too, however, it's a trillion times better than java.
>>
>>53574231
i started with codeeval
i reached the top 5% in C before moving on to better things
>>
>>53574198
>Java is just as dangerous as C, maybe more.
Java is even more dangerous because it gives dumb users the illusion of "safety" while it has virtually none. C is at least open and honest about its foundations.
>>
>>53574288
lmao
>>
>>53574277
Same as Haskell, although not to the same extent. I laugh whenever I hear someone say that Haskell is completely safe because it's so far from the truth.

>>53574288
all me
>>
>>53574219
fuck off to >>>/g/wdg retard

>>53574198
>Popular things tend to be shit (ex: windows)
wow fucking neckbeard

>>53574234
epic meme
>>
File: ggg.png (213 KB, 934x578) Image search: [Google]
ggg.png
213 KB, 934x578
>>53574198
>Popular things tend to be shit (ex: windows)
Windows is shit, Java's not

>Emacs
lmao

>Slower than C and tons of other languages
sorry, nobody wants to deal with C except for basement dwellers

>Like most languages
>effortlessly
no.

>Java is just as dangerous as C, maybe more.
this has to be the most retarded statement of the year

>A language can't be slow, an implementation can.
this too

>It is an enterprise meme.
true, but this only applies to Spring and Java EE

>>53574211
>*Takes on average more lines to code
Only if you use retarded design patterns

>Not as good as C
Serve different purposes. Nobody wants to deal with C except Linus Torvalds and neckbeards

>>53574216
>It's fast enough for simple things but the more complex a program is, the more it shows its bloat and slowness vs. other languages.
the more complex a Java program is, the more it shines in performance. plus the JVM warms up too the longer it runs

>Not Windows only
mono is literally the slowest piece of shit in the world

>Learn to program, kid.
C is a meme language
>>
>huurrrrr java is safer than C!!!111(one)
oh, yeah?
Java has null, if you are going to crash in C due to a null pointer nothing stops you from doing it in java too. In fact Java is less safe as it does not have pointers and every object can be null.

>hurrr out of bounds!1111! Java doesn't have that!1
wordList = new String[arraySize];
wordList[arraySize + 1];

Java is more unsafe than C.
>>
>>53574309
it's to an even further extent with hasklel, its users are so fucking smug but they can only produce very shitty code
>>
>>53574335
nice strawman f a m
>>
>>53574335
>doesn't know about buffer overflow
>>
>>53574273
Is there a list of which languages?
I don't like the whole ranking system attached to it.
>>
>>53574335
idiot, it throws an exception straight away, in C you get UB and heap corruption that may or may not get detected much later, and with no indication of which part of the code caused the problem
>>
hasklel lmao retarded sperg hot opinion
>>
>>53574317

>lmao
Are you claiming that the best IDE in the world that has support for every language is not the best? rofl


>sorry, nobody wants to deal with C except for basement dwellers
Rust? C++? Haskell? Lisp? Most other languages?

>no.
Wrong

>this has to be the most retarded statement of the year
See >>53574335
Prove me wrong

>this too
Are you claiming that a language is a software?

>Only if you use retarded design patterns
Even if you don't, you are going to get a bloated shit.
>>
>>53574366
Use an implementation that does bounds checking. I know many that do that.
Clang and GCC provide an option for that and there is a safe-C compiler that guarantees no UB and multiple static checks.

>>53574350
>>53574356
>no arguments
>>
>>53574377
please explain how

type Date = (Int {- day -}, Int {- month -}, Int {- year -})


is supposed to be better than

typedef struct Date { int day; int month; int year; };


haskell is SHIT and you know it
>>
>>53574416
newtype Date = Date { day :: Int, month :: Int, year :: Int }
>>
>>53574416
Looks cancerous
>>
>>53574412
>no arguments
https://en.wikipedia.org/wiki/Buffer_overflow
>>
>>53572931
>OCaml
>SML
>job
pick one
>>
>>53574439
a = new int[10];
a[11]

your point?
>>
>>53574384
>Are you claiming that the best IDE in the world that has support for every language is not the best? rofl
Emacs isn't even an IDE. Remind me when Emacs will refactor a million line Java codebase with hundreds of files, debug it and detect all compilation errors on the fly. And nobody uses it except for Richard Stallman and maybe you.

>Rust? C++? Haskell? Lisp? Most other languages?
nice memes

> Wrong
when you have make multiple projects and compile multiple times, and debug on every platform it's not effortless...

>Prove me wrong
multiple people did

>Are you claiming that a language is a software?
I'm claiming that if you'd write the equivalent code in Java or C and then in Python there would be a speed difference

>Even if you don't, you are going to get a bloated shit.
Nope
>>
>>53574450
OCaml then. It has more features and libraries than SML.
>>
>>53574450
>Job
If I go get a pajeet job I will just learn the language they ask me. Languages are easy to learn.
Moreover, programming is a form of art, get out with your corporate bs.
>>
>>53574457
Java does bounds checking you stupid retarded piece of shit. This prevents buffer overflow attacks. Your muh high performance language does not.
>>
>>53574474
ok retard
>>
>>53574483
A competent programmer can prevent buffer overflow attacks in an "unsafe" but fast language without incurring the performance hit of doing bounds checking fucking everywhere.

User input can be checked once and its properties can be assumed henceforth.
>>
>>53574474
Nobody does on the job training anymore.
Why should they waste money training new hires when they're so desparate for a job that they teach themselves on their own time even while they're starving due to no job.,
>>
>java
this shit passed QA?

lmao
>>
>>53574511
no one is competent you delusional tard
>>
>>53574461
>And nobody uses it except for Richard Stallman and maybe you.
How about the Java creator? He is known for making his own emacsen too.

>nice memes
>everything I don't like is a meme

>when you have make multiple projects and compile multiple times, and debug on every platform it's not effortless...
It is

>multiple people did
nope

>Nope
Let the pros talk. I have worked on an actual and real world java project.

>I'm claiming that if you'd write the equivalent code in Java or C and then in Python there would be a speed difference
A language is not an implementation.

>>53574483
>can't read
see >>53574412
>>
>>53574513
>Nobody does on the job training anymore.
Not him, but I got a new job not knowing 90% of the tech used, but they are offering training, so I'm not sure where you're getting this from. Additionally, there have been other stories on /dpt/ of people not knowing the base language being used, or having strong programming skills, but they were able to get in due to graduating or other reasons
>>
>>53574522
I know you're not but what am I?
>>
>>53574556
you're delusional

anyone can make mistakes when they have to deliver an actual product in a reasonable timeframe
>>
>>53574571
Deliver your shit to the designated street in a reasonable timeframe.
>>
>>53574584
literally delusional
>>
literally delusional retarded sperg
>>
>>53574511
Higher risk tho
>>
>>53574601
Of course, which is why languages that do it by default like Java are more appropriate for workplaces filled with retards.

That poster seemed to be implying that applications written with C can be buffer overflow attacked and there's nothing you can do about it.
>>
>>53574614
C itself does nothing to prevent it. the programmer has to put a lot of effort into examining and safeguarding his own code just so it will run milliseconds faster.
>>
>>53574511
Openssl (^:
Xen (^:
My answer is: use Rust.
>>
File: pajeet.png (116 KB, 867x436) Image search: [Google]
pajeet.png
116 KB, 867x436
>>53574571
>timeframe
>>
fuck off and die you stupid shitposters, grinding on and on about the same trivial and pointless "discussion" topics day after day
Thread replies: 255
Thread images: 33

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.