/dpt/ - Daily Programming Thread

Old thread: Post your IDE edition
>not using background images and font ligatures

What are you working on, Sup Forums?

Other urls found in this thread:

twitter.com/ID_AA_Carmack/status/753745532619665408
mercyforanimals.org/jobs-application?jobId=252646
tiobe.com/tiobe_index
twitter.com/SFWRedditImages

Why is your IDE in your web browser?

wut u on

sauce

Whats a nice easy script I could make to help me learn python?

>making threads before the bump limit

here homie

This one is after the bump limit:

brainfuck interpreter

thanks bud, can i save it?

it's all yours hahah :^)

>no "how 2 take screenshot"
Stale humour lad

maybe google stale next time lad

>Talking with cutie girl at work
>Discussing final year projects and programming
>Sup Forumstard waddles over
>Starts interrupting us when he wants to "correct" us
>Talks about how good D and RUST are
>Dismisses anything else as "casual" "meme"

I just had to let him go with it and wait till he needed to waddle off to lunch before I could get back to a reasonable conversation with the girl

>talking with cutie girl
>about programming
D and Rust are shit but that part is at least believable
Stale implies not funny
Well looks like we're stuck with this thread, so I'm deleting my other posts

D will be goat soon.

I did it lads. Now to clean up the code. And create it as a Java.fx program..

Stupid question incoming. Learning C.
What is the best (lightest, simplest) way to store this type of data. (pic related, it's Football Manager).
I think there are formats like xml, or json, is raw text, like ascii files even possible?

json

D will never compare to GHC/Haskell

Haskell's a meme

text files possible? yes but that's stupid just use json like any sane human being

What do people even meme by that?
Because people keep advocating it?
Is that supposed to be a bad thing?
Because you don't understand it?
Is that supposed to be a bad thing?

It's a joke language, designed just to be elegant, and not practical

>It's a joke language
It's not

>not practical
In performance critical systems

Yeah, right.

>it's more popular therefore it's better
Then why is D #23?

>0.3%

haskellfags on suicide watch

It's still garbage collected, although that's to be fixed.

>as soon as it loses garbage collection everyone will use it
kek

>migrating from the wrong thread

lately i have been working a lot with java and thought i should give android development a try but it's fucking turbo cancer.

git gud faggot

Did you have any problems with unicode characters not printing properly. I've hit a wall with my command line browser because it keeps shitting itself when a non western standard unicode character shows up

>Java
dumb frogposter

get good idiot
also stop using outdated python

use python3 where it doesn't have unicodedecode bullshit

So in python I have a value and I want it to print text and the value on the same line, how do I do this so far I could only think of
print ("text" & str(value))

how should I do it?

Why has /dpt/ been full of snekfags these past few weeks?
Is kindergarten closed over the summer?

i want to git gut, but the ide gave me aids

So I'm trying to learn C++ with code::blocks, is there an easy way to automate adding declarations in the header files after implementing functions, constructors or variables in the source file?

print('{}{}'.format('text', value))

Read "The Big Nerd Ranch Guide on Android".

thanks, i'll look into it.

thanks

How do I read Intel Software Developer Manual and not kill myself?

hah, no
this is c++, a mans language
you gotta do that manually in every ide.

No problem. It's important to note that you don't need str(value) here because format will take care of that for you. It's different if you use %s%s (C-string format)

ok thank you

Is json superior to xml for any specific reason, or is it just personal preference?

>more redundant, needless lines of code is what defines a manly language

Oh wait, I tested it and I'm wrong, you don't need str( with %s

easier to understand, much easier to parse, easier to create

I've thought of writing a program to do this. There is absolutely no reason you should have to manually update your forward declarations.

why do people do this:
int *variable
or
int *functionName(){....}

why do they put the * to the right side?
it's like saying:
create an int.........pointer variableName
when the correct way should be:
create an int pointer...........variableName

Why does everyone publish their APIs in fucking json?

Am I supposed to write my own C parser for this shit?
I don't want to include yet another library.

It's just for consistency.
The function returns a int *.

because
int* x, y;
does not do what you expect it to do.

would you prefer XML?

or some garbage, non standard collection of colon separated values

Because it makes more sense when you have multiple variable declarations in 1 line, and the possibility that it will be a mix of non-pointers and pointers

Because if you declare multiple variables on one line, it's inconsistent and easy to forget to add a * for each you intend to be a pointer. In your head you're then declaring pointer to an int, but in reality you're declaring, some of which being pointers.

eg:
int* var1, var2;
var1 is a pointer, var 2 is an int.

>int var1, var2, var3;
if you code like that you should kill yourself

the replies to this tweet: twitter.com/ID_AA_Carmack/status/753745532619665408
are scary.
it's incredible how many people are completly ignorant of the fact that excessive abstraction causes boilerplate, hard to read and hard to refactor code

how do we stop this overabstraction trend, /dpt/?

t. beginner

I think overabstraction is fine when the developer knows how to create their own and isn't blindly using other people's black box libraries all the time.

This is almost never the case, however.

overabstraction isn't fine when a developer creates it himself.
seriously. you can take DRY very far (even to the degree of using COMEFROM like code like aspect oriented programming).
libraries, as an abstraction, at least often have a purpose, while most abstractions in local code don't.
they're there for the ego of the author, not because they actually have a purpose (either that, or the author blindly believes principles and applies them everywhere).

Just wrote my first ever fizzbuzz and would like some feedback
start = int(input("from:"))
end = int(input("to:"))
yes = set(['y'])
no = set(['n'])
print ("Do you want numbers that are not Fizz/Buzz/Fizzbuzz to be printed? [y/n]")

choice = input().lower()
if choice in yes:
print ("Doing fizzbuzz from", start, "to ", end)
for count in range(start,end+1):
if (count % 5) == 0 and (count % 3) == 0:
print ("Fizzbuzz ", count)
count = count +1
elif (count % 3) == 0:
print ("Fizz", count)
count = count + 1
elif (count % 5) == 0:
print ("Buzz", count)
count = count +1
else:
print (count)

count = count + 1

if choice in no:
print ("Doing fizzbuzz from", start, "to ", end)
for count in range(start,end+1):
if (count % 5) == 0 and (count % 3) == 0:
print ("Fizzbuzz ", count)
count = count +1
elif (count % 3) == 0:
print ("Fizz", count)
count = count + 1
elif (count % 5) == 0:
print ("Buzz", count)
count = count +1

>* oriented programming
When will this neverending meme die?

is this bait?

you can do this in like 10 lines max and even that might be verbose

>tfw only OOP has the oriented in it

I didn't know having fewer lines mattered

>object
>component
>set
>language
>return
>protocol
>data
>monitoring
>return
>railway
>multi-agent
>design

repeating code is bad, if you repeat a piece of code often, you're doing something wrong

haven't heard of most of these. They do sound like memes.

also
> * driven design

you should make your code verbose enough to be clearly understandable, but not so verbose as to have unnecessary lines and statements. Also you should strive to never repeat yourself.

really code verbosity can be a disputed matter
code that is very verbose can be tiresome to read, e.g. something simple like
count = count + 1
can be condensed to
count++

code that is not very verbose can be hard to decipher:
(1 to 100).foreach(n => {
print(f"$n:")
if (n % 3 == 0) print("Fizz")
if (n % 5 == 0) print("Buzz")
println
})

There's probably a way for me to condense that into a single line but it's been awhile and you get the idea

wat

You don't need to increment count ... that's the point of the for loop. And for some reason you print count every time.

Holy shit.

t. haskell neet

mercyforanimals.org/jobs-application?jobId=252646

Should I apply?

>applying to a company that can't spell Dr correctly

not only that but you only needed to iterate thru the numbers once and check if they wanted numbers in the loop

>Rust

pls no

C is good enough

Oh also, which functional language should I learn that isn't completely fucking useless when it comes to actual programming, not just math meme languages?

scala or F#

>mercyforanimals.org/jobs-application?jobId=252646

this looks awful

seconding my vote would be for scala but F# looks really neat too

Any way I can make a quick little python script to block a computer from getting to a website? I've gotta lock down a bunch of computers for zero dollars and I dont want to spend hours messing with firewall.

HAHAHA THANKS LORI

I was planning to program something last sunday but was too busy then and during the week. Now I have time but I can't remember what I wanted to do.

Thanks guys I'll probably go with Scala seeing that F# is a Microshill brainchild

scala also has the nice ability to mix regular java directly into your code

Why didn't you type it in your org-mode capture buffer?

Firewall is needed here. Just add a rule that forces traffic to go through your HTTP proxy(python script) and take it from there.

Just the company name is cringe, must be full of SJW.
Apply, if the pay is good, become an even try-hard SJW

I use vim, I have a todo file but didn't think to put it in there.

That todo file seems to be filled with porn links, no idea how that happened.

Debugging my trie implementation.

Data driven design is a legit thing though.

tiobe.com/tiobe_index

Java and C, nothing else comes close.

>legit thing
It's a meme you dip.

literally was just about to say this

They sound like Python programmers

Whoops, didn't mean to namefag, sozall

I already know those but thanks

Fuck off ya cunt.