/dpt/ - Daily Programming Thread

previous: What are you working on, Sup Forums?

Other urls found in this thread:

bots.botframework.com/
imgs.xkcd.com/comics/debugger.png
jsfiddle.net/pzpqL9ou/2/
imgs.xkcd.com/comics/clark_gable.jpg
stackoverflow.com/questions/1143936
github.com/mrooney/mintapi
techcrunch.com/2016/11/16/microsoft-joins-the-linux-foundation/?ncid=rss
twitter.com/NSFWRedditImage

I use vim.

>xkcd
Fuck you OP
You're a faggot

daily reminder that there's a programming anime where each language is a real girl soon TM

I'm actually surprised it hasn't already been done, considering Upotte is a thing.

Python?

C#

Anyone had any experience working with chatbot APIs? Or better yet, made their own chatbot?

I'm considering developing a chatbot but I don't really know where to start. There are loads of APIs and platforms.

anime name?

so /dpt/. were humans software coded wrong? It seems our entire way of thinking is designed for another type of hardware than the one we went into the civilized era with. If we approached consciousness in another way would we work better?

Turns out the botnet is pretty good at bots. I was able to make some simple interactions pretty quick with this:
bots.botframework.com/

IBM has an interesting offering with Bluemix + Watson, but it's a bit rough and isn't quite as intuitive.

It's pretty scary how easy it is to set up basic applications with cognitive services with things like Azure and Bluemix.

deep post
*farts*

>the debugger tries to debug its own code
>imgs.xkcd.com/comics/debugger.png

stop posting xkcd, this isn't reddit

jsfiddle.net/pzpqL9ou/2/

Why my fractal get pixelated after 47 zooms ? I think it has something to do with the maxium floating point or something like that

Also i feel like my code is shit, any idea to improve it ?

>xkcd

Yeah, it's a mystery but I guess nipponese take a straight career decision so they mostly learn either drawing or coding, not a combination of both.

It's apparently a more education based animoo rather than a "lets sell as much figurines and garbage as we can get", so I'm guessing it's to motivate more children toward IT.

What's the difference between #pragma once and #ifndef CLASS_H #define CLASS_H?

>Frankly, I dear, I couldn't care less.
>imgs.xkcd.com/comics/clark_gable.jpg

...

>stackoverflow.com/questions/1143936

The lack of async/await in constructors is a pain in the ass. What's the best way to asynchronously load data when creating a viewmodel?

We are neural nets. The hardcoding hardly has to do with the specifics of what we learn. You do not have an English instinct but its probable that you have a language instinct. You don't have a 21st Century post-post-industrial culture instinct, but you do have cultural adaptation instincts. Humans are pretty malleable.

>What are you working on?
tracking my money

programs like this probably already exist, but I wanted something special that can

1) pull feeds from my bank account + credit card
2) show my actual money (bank account + (confirmed) credit card transactions)
3) categorise each and every individual transaction, probably through regex or something
4) chuck it all into a google spreadsheet and have amazon lambda update it every 30 minutes or so

that would be simple to do, but I want something better:

5) show my unconfirmed credit card transactions
6) pull feeds from things which have flat payments, e.g. gym membership/public transport/work.
e.g. every day I might spend $4 for public transport, but I only get debited when my transport balance goes below a threshold and then they take $50 from the credit card.
I want to show the $4 instantly on the day it was used, not just one big $50 payment every 20 days or whatever.
also other things like getting paid every Friday for work, but I want to show my money as going up on the individual days I work.

Did we ever figure out how to average two ints in C?

Thanks, I'll look into these.

what's the shittiest job interview question you got asked, Sup Forums ?

Did we ever get a formal definition of the average of two ints?

int i=1;
int j=3;
int average = (int) ( (double) i / (double) j));

You cannot deny this.

If you have to post them at least use a lighter protocol
gopher://gopher.floodgap.com/p/fun/xkcd/comics/1160/1163/debugger.png

>wearing t-shirts that are supposed to present that you're part of some identity that you find virtuous
cringy.

Use Mint to aggregate your data, then either scrape your own or use this Python library to retrieve the data:
github.com/mrooney/mintapi

From there, you can integrate the cumulative spends like your transport balance into a custom application.

im in australia :(
but thanks anyhow

>Where do you see yourself in 5 years?

Well, Mr. Fagtron, ideally I'll be on a yacht in the Caribbean doing blow off of an imported Swedish trophy wife's natural titties. I will, of course, have signed a watertight prenuptial to avoid potential complications.

Realistically speaking, it's disingenuous to even estimate where you'll be in 5 years, particularly when you're near the beginning of your career and not married.

I actually basically said all this last time, and got the job, so I guess honesty is a good way to go.

>this isn't reddit
what did he mean by this?

Are anime thumbnails for dpt officially deprecated?

Now that you asked, yes.

you fukin wut m8

No, people are just trolling when they don't post anime.

>What interests you about our company

>cringy
Said the Sup Forums poster.

what are you gonna do about it big boy?

You are actually crazy enough considering to hire me. Then again I am secretly thinking that all your programmers will have no idea how to properly program, and that I am just going to be another soulless cog in your machine that is crushed by the bloat that you have been accumulating for years.

Nothing. It's not like i'm not a Sup Forums poster meself.

>this isn't reddit
>posts normie anime pictures

that's a Sup Forums maymay made on Sup Forums you plebe.

>normie
You've got to go back

Hey. I made an ASCII decimal code converter in C. 81 outputs Q character. .81 outputs solid right arrow and any number with a period before it for that matter and 113 outputs q. Is this correct?

Nevermind. I googled a chart and confirmed it's correct. How do I allow myself to enter two values in the same program? I doubt my professor wants two screenshots. I currently end with return 0; which I presume means to end the program when you press any key.

>.81 outputs solid right arrow and any number with a period before it for that matter
wat

The rest is fine but this is literally the easiest task ever in C
putchar(81);
wow an ASCII decimal code converter!

loop until the user enters a non-number or something like 'q' (for quit).

#include

int main(void)
{
int n;

while (1) {
scanf("%d", &n);
printf("%c\n", n);
}
}
Enter a number, the ASCII character is displayed on the next line. Press Ctrl+C to quit.

No. I think it is correct already. It assumes any value you input is a decimal anyway. Putting in .81 doesn't make logical sense.

Thanks brother. I should have figured that.

>can i program in girl clothes at the office?

>I currently end with return 0; which I presume means to end the program when you press any key.
return 0 means what it says, it returns 0. If this is the main function that means it returns 0 back to the environment where the program was executed and ends the program. It does not include anything about "when you press any key", that's probably the IDE or other environment you are running the program in.

>Get some source code.
>Compile it, alright.
>Try to run it.
>Error dll not found.
>wat.png, i need to compile some other dll.
>Get dll source code.
>mfw i need to compile yet another dll after.
>Get next dll.
>Errors out the ass.
>why.dds
>This dll has no includes included.
>Download include files.
>Error someshit class not found.
>FUCK
>Notice includes are made in C and C++, with dependencies for some other framework
>Jesus fuck.
>Get all the fucking includes.
>Notice all this bullshit have the SAME NAME INCLUDE FOLDER and can't figure what the fuck is the correct one because they have the same fucking exact names but with different code in them.

This shit is maddening, i can only imagine the clusterfuck of files the person that compiled this bullshit has.

nano

nothing more is needed

Gross

what? why did you use an anime word not even knowing what it means? what kind of retardation is this?

Thanks. I wrote it slightly different. Sorry. I don't know how to make the white text boxes.

#include
#include

int main()
{
int a;
printf("Enter an ASCII code value\n");
scanf("%d",&a);

char b = (char)a;
printf("The character that corresponds to that ASCII code is %c\n",b);

return 0;
}

Can we all be friends now?

techcrunch.com/2016/11/16/microsoft-joins-the-linux-foundation/?ncid=rss

>Node.js

...

Thanks. I'm using Pelles C as it seems good for windows and lighter than visual studio.

I used to write all my cote in notepad++, but after a while I found it too bloated.

Now I use default windows notepad and it works like a charm.

t. win programmer

>not using DOS to code

What is the point of this post?

Why would you think that anyone would believe that someone could be this silly?

Does this post count as one of your coveted (You)s?

After using emacs I think I'd rather kill myself than use Notepad to program

@57540776
epic

>using notepad>open file written on *nix system>mlw (my lines when)

Is this big news for people who program on Mac?

Big news for some, not relevant to others.

Your question is poorly worded, and any anecdotal answer would not help you form any coherent thought on the subject.

I just put some words alongside the image to open up the topic
Thank you

>What are your general thoughts on software development
Something along those lines, they gave me exactly zero ideas on what to answer

Same for best:
> What do you think are the two greatest advantages and disadvantages of CLI versus GUI applications

When I write code, I always use echo code > program.c to be honest.

I am not joking you fucking faggot.

Notepad++ is neat, but it has all these buttons and menus that I don't know the purpose of, and they make me anxious. It's like I'm not using the software correctly or something.

Regular notepad, you can't fuck up.

My immediate thoughts:
CLI:
>better for automation with RMM tools like LabTech and Kaseya
>much less maintenance
>poor (non-power)user experience
>display of information is limited

GUI:
>better UI/UX, generally easier to use
>Can display complex data visualizations to properly communicate ideas
>Virtually impossible to properly automate in an enterprise
>Vastly greater development time, testing, and maintenance

Some kind of redundant, I guess.

I have an irrational hatred of the term 'syntactic sugar'.

Echo a program to print "Hello\n /World"

I think that's fair, considering that virtually everything is syntactic sugar for something lower-level.

Wew answered about the same, but added SSH control as a CLI advantage since their business was remote server management

For the term, or the concept?

I'd ask why, but you can't base an interesting conversation on 'irrational'.

>all these buttons and menus that I don't know the purpose of, and they make me anxious. It's like I'm not using the software correctly or something.
I feel the same way about Visual Studio tbqh.

>you can't base an interesting conversation on 'irrational'.
t. Q

>fpc
noice

I did too, at first.
Then i got used to some of the features, learned to ignore other, and now i can't be comfortable with anything else.

wat?

>spend a few days trying to create a program for an assignment to no avail
>change one line of code and everything compiles flawlessly
Is this the feeling you guys live for?

I used to feel that way about Visual Studio, and then I slowly started exploring all the built-in tools.

Now, it's either Visual Studio or I'd have to create a "totally-not-an-IDE" out of whatever text editor by configuring tens of addons.

All of the debug features, Paste Special, IntelliSense with object/method/property filtering, git and other version control integrations, automatic NuGet package management, Xamarin built-in, and most of all, it's what I'm used to now.

It would be, if I had the least interest in IDEs.

>his IDE didn't identify the issue and suggest a fix for that line of code

I use all the buttons on Visual studio, snippets, templates, debugger.
I even make extensive use of the cloud with azure.

> write from scratch for a whole day
> compiles first time
Bretty gud.

I'm doing this shit in Notepad++

"why are you only wearing striped pantsu and thigh high socks?!"

I don't know why FPC isn't the most popular language in the world.

It's like the best of all worlds. It's as multi-platform as it gets, it has a gui builder, it's decently fast, it can do embedded as well as high level programming, it compiles in the blink of an eye, saves you from dll hell by including everything in the binary, AND it doesn't need a fucking bloated VM running in the background to do any of this, it complies into a native binary.


Why the fuck would you use anything else?

>azure
Holy fuck, this thing is like programmer's cocaine.

Stupidly easy to set up backend data and integration services.

Plus, I get $100 of play-money in Azure every month (on my personal Microsoft account) because I work for a company that's a Microsoft Gold Partner.

Azure makes me erect. Metaphorically speaking.

The term. I'll let you know if I ever figure put why. I think it has to do with the sugar part specifically

What would you rather call it, then?

Can you guys help me with something? I'm trying to use backtracking to return HashSet of Strings of all possible topological sorts of a graph. I was able to get my program to return one path through the graph and that's it, so I think it has to do with my return statements.