/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

stackoverflow.blog/2017/09/14/python-growing-quickly/
github.com/facebook/infer
twitter.com/AnonBabble

...

Let's all love lain.

Looks sane to me senpai.

haven't seen a pass user in a while

why do we you like lain so much? is it just because she's a cute girl and does computer things? the show has barely anything to do with programming

That's because a lot of them hide it because they will get called attention whores or giving money to the jewish gook.

It does have a lot to do with programming! She programs in LISP!

This lainfags and NGE fags are the most pretentious bunch of weebs imaginable

They should have kept protected in private inheritance, this way protected inheritance would be unnecessary at all.

>the show has barely anything to do with programming

omg a screenshot

It's an escapism anime that's heavy on existentialist atmosphere that revolves around a cute girl delving deeper and deeper into computers and death.

It's no wonder why Sup Forums loves it or why it spawned its own chan.

Which is better for unit testing, Cmocka or Check?

>strcom
>if strings are equal returns 0

*strcmp

>his language doesn't have bool

I don't mind that. The real problem is how useless the negative and positive returns are.

>strcmp returns bool

>he can't compare strings with ==
wew

>his language has bool

trying to fix a disaster of a custom CMS written in .NET/JS. it's such a fucking mess. last week one of the junior devs wrote something that unintentionally substituted order number with the WIDTH OF THE THUMBNAIL. this somehow wasn't caught by code review, and we don't have any QA, and was released to ~300 clients. we hotfixed in a few hours but the fact that it happened at all is so typical of this organisation. i died.

>strcmp doesn't return a bool

>His strings are null-terminated

>His language doesn't have strings

>written in .NET/JS
I can tell

>his language has strings
Hi webdev

The only thing that's wrong with this is that public inheritance is not the default.

>His language doesn't have strings and yet he uses %s

Can you make a string comparison function that constructively uses a sentinel? I can't think of a way.

>His language can't even split ranges

your database is shitty probably

but mine can, i can even chunk them if you want.

I fucking know. we also have no db admin and no server admin. he just expects all devs to pull triple duty. some of our older clients regularly do db lookups that take >3 seconds to return ~5000 rows and none of us are qualified to fix it, but tech lead refuses to hire anyone specifically for it. it's a joke.

Wow. That sounds awful. Look for another job. This place can clearly not give you a reference worth a damn.

Shut up, D fag. Go replace your GC with unique_ptr first

handed my notice in last week. the CEO is so picky to hire anyone new that they offered me a raise and a massive bonus to stay on for longer, so I took it. makes no sense because desu I'm not even THAT good, but whatever. I just laugh about it now.

stackoverflow.blog/2017/09/14/python-growing-quickly/

what the shit

kek

Well that's good at least. Glad you're looking out for yourself. Too many people just stick around in bad situations for no reason.

>stackoverflow
Didn't read, what's the tldr?

there's definitely no reason to stick around in a place like that where I live (unless you get an offer like I did). tech jobs are booming here right now, I'd have no problem finding something else. do feel bad for anyone in a situation where they'd feel too anxious about not being able to find something new to leave a shit job though.

>I am data """""""""""""""scientist"""""""""""""""

desu first what comes to my mind is that you got no relations, just connect tables and enjoy

You're're retarded.

char *names[] = {"Stalin", "Mao", "Hitler", "M00t". "OP"};
qsort(names, sizeof(names)/sizeof(names[0]), sizeof(names[0]), (int(*)(const void*, const void*))&strcmp);

honestly I have no idea, I'm not qualified in db admin whatsoever. I can write lookups but that's about it. every single one of us keeps telling the tech lead to hire an admin, and he refuses. it's going to be like this something really disastrous happens or they force one of us to learn how to database.

#define -1 1

Nigga use English. The only definition of sentinel that I know of wouldn't make any sense for a strcmp function. Or am I being baited by a bot...

define You (exit(1))

Goddammit, fucking phoneposting is the worst.

It works the way it does because it tells you not only if two strings are equal, but also their alphabetical order.

>Can you make a string comparison function that constructively uses a sentinel? I can't think of a way.
All the C string functions "constructively use a sentiment" to determine when the string ends... C strings are null-terminated.

sentinel*

>it's going to be like this something really disastrous happens or they force one of us to learn how to database.
the 2nd one, probably he is gonna make you all learn it. Why would he pay extra person for that

What would be the best way to create this gui in java?

How do I learn to type without looking at the keyboard?

play an MMO.
It's how i learned, desu.

it's completely normal for an organisation of our size to have a dedicated database admin. I really don't know what his thinking is or why he refuses.

->data scientist and machine learning people sometimes use python
->python is growing evenly across all industries
=>therefore data science and ai used in every field
Wew, so this is the power of data """scinetists"""
Also
>implying so tags have any connection to the actual industry

MMOs are dead

>java
>xp
>lorry
I can smell the curry through the screen

Not really, you just gotta look beyond theme park shit.

Practice
I used klavaro

>xp
I took that image out of my project file

You should delete the entire thing if you think that GUI is acceptable in the current year, rajeesh.

I don't see why I shouldn't use protected instead of private members, with public inheritances.
- I don't have to make access functions to read the base classes
- Being protected, functions outside the classes can't read/write on the members

I don't decide what the college wants me to do.

why are you learning sepples, rustlet?

Qt Quick 2 application

Also, do the private members get inherited at all? They aren't accessible anyways.

Do that if that's what you want.

>I don't see why I shouldn't use protected instead of private members
Same reason you shouldn't use public instead of private members: whoever inherits your class doesn't necessarily know all of its internal invariants, so you can't give them access to all of the inner state and expect them to just do the right thing and not violate them.

If I'm okay with the deriv classes being able to read (not write) the members of base, wouldn't I be okay with just creating a const protected member?

Oh wait I can't construct deriv classes in that case due to the some members being constant.

Sticky situation if you ask me.

mmmh

I want a program that notifies me when there's a new post on a subreddit. The API allows me to do that but requires OAuth signing. Luckily, there's also an RSS feed available. So I'll be using that. As a bonus, I can make the program work for any news website that provides RSS feeds.
My goal is to create a program that checks each RSS feed for new entries and prints it to stdout. I also want to be able to save the state of the program to disk. This way I don't get notified of previous articles. However, I'm not really sure on the design of the program. Using SQLite sounds like overkill. So I'm debating on some plain text format or simply serialize the state. The former requires more boiler plate, but makes for easier debugging. The latter just works, but is a binary representation of the program state.

go back there

reddit XD

Maybe you should reconsider if you even need inheritance at all.

I want an up that notifies me when I get a (you) on Sup Forums

I only use it as a news aggregator. The community is cancerous.

Why do you need a notification then?

because interesting stuff might get posted to subreddits?

To see if there's a new article I might be interested in to read.

bumping this

then just go to the page and scroll through it looking for interesting headlines? it'll take a few seconds per page

What is reddit?

I wouldn't want to keep 15+ tabs of reddit open at all times

not open, just browse when you want an update

I don't want multiple tabs open and refresh them manually. I can automate that. The only thing left for me is to see if the new article is interesting enough for me to read.

No, I'm just saying go to the fucking page and read when you want an update

I want to be the first to post memes and reap karma though

Of course I could do that. This is just a simple toy program to keep me busy this weekend.

I grok this

can't for the life of me grok this past

yeah I grok

> C++

Is there a Linux IDE that has debugging integrated as good as Microsoft VS?

no a program should do one thing and do it well

I don't think so

IDEs should do all things well

Eclipse CDT, Qt creator etc.
Shouldn't you be using a debugger in a separate terminal window?

Also, see
github.com/facebook/infer

tried netbeans/cdt already?
not quite as good but seems ok

there is also clion, not free though

>Shouldn't you be using a debugger in a separate terminal window?
No? Debugging and setting breakpoints in your IDE is basic shit otherwise why use an IDE.

An RPG and Photo Editing Application, I'd give the idea of the Application but uhhh someone might steal