/dpt/ - Daily Programming

Let's get productive edition.

Previous thread: What are you working on Jow Forums?

Attached: teach_me_cpp_senpai.jpg (1440x810, 155K)

Anyone know why all the data bytes from the audio callback for SDL2 are 255? I'm attempting to record sound and analyze it in real-time.

Ruby shill reporting in

Thank you for using an anime picture.

What is this anime

Programming languages which will get you jobs
Java
Python
FORTRAN
COBOL

Useless programming languages
C
C++
HTML
Perl
Ruby
Javascript
C#
BASIC
PHP
Tcl
Assembly
Go

Where the fuck are fortran jobs?

Don't bother with it.

Attached: [HorribleSubs] New Game! - 06 [720p].mkv_snapshot_09.10_[2016.08.16_12.49.19].jpg (1280x720, 307K)

>COBOL
>gets you jobs
The 1970s passed a long time ago friend

Attached: icon.jpg (250x250, 18K)

That's why they get paid so much. Nobody goes to school for it.

Handling legacy systems = lots of money. High demand, low supply. The business world is outdated as fuck. My old company still ran systems from c. 1996

Businesses use Fortran?

legacy code-bases.
Banks especially still use pretty old shit, which is ironically sad.

But Fortran? I always associate it with physics labs and stuff.

GIVE ME SOMETHING TO WORK ON
HELP

Attached: fists.png (233x261, 28K)

Is it as daunting as it sounds to work on those legacy bases?

>Le reddit man
Work on a program to kill yourself.

>Useless programming languages
>C
>Assembly
Aerospace doesn't even use multicore or threading yet.

i just picked a picture so people would reply
thanks though

Threading was a mistake.

Don't think of threading as any of its crappier implementations. It's just a methodology of parallelizing code.
When aerospace does start using multicore most everything will be application specific, so you're looking at custom schedulers and custom memory locks, not something like windows or boost libraries.

nvm i fixed it ;)

assembly is so comfy
org 20
jmp init
msg dd 's','t','r','i','n','g',0h
init:
mov dx, 0h
push dx
push di
push cx
start:
mov di, cx
mov dx, msg[di]
jz print
push dx
inc cx
jmp start
print:
mov ah, 2
pop dx
int 21h
dec cx
jnz print
deinit:
mov dx, 0h
pop dx
pop di
pop cx
END

write a program that modifies vocal input in real time based on sound clips from famous jewtubers.

yes
you do not want to work on a complex COBOL codebase
you will want to gouge your eyes out

Does the pay compensate for that in any way?

the COBOL guys at my company probably make the most out of everyone (we have C# devs)

Just a quick style question
hasPage(i)
or
havePage(i)
which one would you use?

first

yeah, thats the one that I was feeling as well
ty

have an exam next week.. studying for programming courses is so awkward

Our main application is in Cobol. Like 2 guys in the entire organisation know it. Currently a $2bil project to replace it.

t.New Zealand Government Employee

>Currently a $2bil project to replace it.
That's ridiculous.

>It takes $2 billion to be able to pay teachers properly (not including actual wages)
Sasuga, bro.

TFW I'm attending a C# course rn

Attached: 1496489455527.jpg (619x453, 28K)

dumb frogposter

rood :(

fuck you

Rust.

Lisp.

Ruby

Crystal

Malbolge

is this the shit language list?
python

Throwing my hat in the ring:
Matlab
>Every function in its own file
>For loops don't work with column vectors
>Disgusting function syntax

C

No, it's "one of these not like the others" puzzle, and the answer is Lisp, because the rest are actually good languages.

good god that's awful
why couldn't ML have won

++

Reminder that languages are tools and you should stop wanking over them.

There's nothing wrong with wanking over tools.

some tools are bad and some are good.

>Aerospace doesn't even use multicore or threading yet.
Because verifying parallel code is a nightmare still. It's hard enough to verify shit today, adding yet another dimension to that would result in significant amount of deaths.

Oh wow can't wait to here another fucking retard bring up his stupid toolbelt analogy

hear*

remember if your hammer is made of glass (python) and u break it its your fault.

Dumbass

Attached: 6a0120a85dcdae970b017742d249d5970d-800wi.jpg (502x370, 46K)

shorter while remaining clear is almost always better. Plus havePage reads a bit awkwardly.

FPL's only have speed and nogc/linear types to fix and then they will literally be perfect.

There is, they get all sticky covered in cum and can no longer do the job properly.

If there's a single person out there who uses Java LWJGL please tell me how to use Hidden Switches.

I have to mark this C code and I am not allow to give it less than 30%.

566 int additiontime(int time, int zoneminutes, int newminutes, int newhours
567 , int town, int local_time, int zonehours, int utcminutes, int utchours) {
568
569 valid = 1;
570
571
572 // XXX YYY and ZZZ --> EDT
573
574 if (town == TOWN_XXX && town == TOWN_YYY && town ==
575 TOWN_ZZZ) {
576
577 if (time + TIMEZONE_EDT_OFFSET) {
578
579 // daylight savings
580
581 //offset
582
583 TIMEZONE_EDT_OFFSET % 100 == zoneminutes;
584
585 zonehours ==
586 (TIMEZONE_EDT_OFFSET - (TIMEZONE_EDT_OFFSET % 100))/100;
587
588
589 // utc
590
591 time % 100 == utcminutes;
592
593 utchours == (time - (time%100))/100;
594
595 //
596 (utchours + zonehours) == newhours;
597
598 utcminutes +zoneminutes == newminutes ;
599
600
601 if (newminutes > 60 ) {
602 newminutes - 60 == newminutes;
603 newhours + 1 == newhours;
604
605 newhours*100 + newminutes == local_time;
606 }
607
608
609 if (local_time > 2359) {
610 local_time % 2400 == local_time;
611 }
612
613
614 return (TIMEZONE_EDT_OFFSET);
615
616 }

Attached: ­.png (960x718, 509K)

>magic numbers
instant 30%

Why are there equality checks all over the place that they aren't doing anything with the result of

So I'm guessing that there was a harsh time constraint which is why he clearly never ran the program

>i am not allowed to give less than 30%
why

download cum-linux and say that again.

i want something like the rxjava timeout operator that lets me transform/switch the stream instead of canceling with an error, what do i do?

use the rxjava timeout operator that lets you transform/switch the stream?

My guess is that they tried a regular assignment operator but it threw errors since the left hand side is not a single variable. But your guess is as good as mine.

Also note:
>if (time + TIMEZONE_EDT_OFFSET)
Time is non-negative and it's being added to a positive constant. I don't even know.

3 weeks lol

Because they managed to write a dozen lines that made sense back near line 100 and the lenient criteria give that 30%. (Well, apart from the fact they think daylight saving lasts a single day.)
Welcome to CS.

thanks for nothing pal I figured it out anyways I can just use debounce + map

>Because they managed to write a dozen lines that made sense back near line 100 and the lenient criteria give that 30%
give them precisely 30% then? unless the criteria further forces you to increase the grade

Beautiful Soup help please?
Given the tag:

How do I extract the image address?

document.getElementbyId*('myLink').href
>>>g/wdg/

links = []
for elem in doc.find_all('link'):
if elem.get('rel') == 'image':
links.append(elem.get('href'))

JavaFX webview GUI + vert.x as backend business logic is so comfy
Ease of making GUIs like electron, but iwth the power and speed of java

i found the use of gwt as a transpiler (and only that, nothing else, everything else sucks) and gwtbootstrap with custom css for ui fine as well, if you gotta use java for some reason

>when you reach sicp fourth chapter

Attached: awesomeness_incoming.gif (500x281, 564K)

I'm trying to make a classifier so that I can filter/flag out political posts when I use Facebook for the rare times I do use it. I'm new to statistics so I've been reading some books. I'm building a naive Bayesian classifier using scikit learn to start. I'm a learn by doing type of guy.

Through my adventures trying to find a good shell for py, I ran into jupyter and ipython. Pretty interesting stuff since I've never done work in a shell workflow. What's a cell? I'm interested in the mechanics of jupyter and want to get comfortable with what's going on under the hood before I move forward.

Why won't C++ add useful features from C99 such as VLAs and SENPAITACHI?

>VLAs
because you can use STL containers?

Those use the heap, which is much less efficient.

I'm in love with C++-sama

Attached: 8212d6c2cf95fd8a9f237bd1a6896a05df67a98a_s2_n1.jpg (600x880, 98K)

Just use a custom allocator instead of malloc then you'll be fine.

By default, yes, but STL containers accept a custom allocator via a template argument that you can use to implement a stack based container.

Can you demonstrate how this is used?

Derive a custom class from std::allocator and reimplement the allocate and deallocate methods to use stack based functions then pass the custom class via a second argument to the container.

*chan

Not programming related ..

where the fuck do you guys find all these anime pics? /a/?

>doesn't even realise this is an anime imageboard
nerd

Attached: anon's randomised image.png (892x720, 202K)

Where do you think you are?

Attached: ignorance.png (777x674, 1003K)

does programming use math..I'm a brainlet I don't understand programming..I'm going through code academy tho for fun..

Attached: 3ragx3q6dymz.jpg (784x643, 77K)

dumb frogposter

If you want to be a half decent software developer, yes, you should have a strong handle on math.

>tfw never gotten that far yet
I'm never gonna make it lads

What part of software development requires math

._. I have like a 5th grade level of math..I think I'm retarded in it..

no bully..

Attached: 1456777438508.png (500x566, 341K)

Wait why is your math so bad?

only if you're developing neural network frameworks or 3d game engines you'll need a good grasp on math but otherwise, you really dont

im dumb..I can't even tie shoes or swim or drive.. maybe I should spend an hour studying math daily and work on it...I really really really want to be tech savvy...it's a useful skill..

T H I C C plot, I tell ya hwat