/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

0x0.st/FFa.java
jamanetwork.com/journals/jama/article-abstract/366606
en.wikipedia.org/wiki/Therac-25
twitter.com/SFWRedditGifs

I'm writing a cryptocurrency exchange in Python.

>What is Delphi?

stop trying to steal my coins, also python isn't /dpt/

A twitter bot. Using it to get familiar with node.js and how restful APIs work.

Really cute picture. I like the headscarf but the only muslim I know is my calculus professor.

I'm currently learning C++. What are some fun things I can program that can be useful?

Hello Google.
You're probably going through this board right now, probably sharia-blue posting as we speak...
I just wanted to say something in case you were listening. Maybe give you a glimpse into how i feel about what you have been doing in the past 16 years:

Fuck you, i just wanted to play video games, program, and watch anime. Your self-righteous moral-fagging has forced me to get involved in shitty fucking politics on this god-forsaken board. If i weren't christian i would have offed myself by now. HOLY FUCKING SHIT I HATE YOU SO MUCH. If i were muslim i would sink money into fucking killing you and your cuckey CEO's this fucking week. I swear by all that is good if i had either the will or the resources i would fucking LAS VEGAS you all to the 9th circle of hell i hate you so and your orwellian shitstain of a CEO so fucking much! Fuck you Goolag. F U C K Y O U.

...I just wanted to play vidya ;_; ...

...

;..;
learning javascript.
i like javascript games so i thought id learn the language and get a job as a front end dev while making a game on the side

why is exception catching so expensive?

Because excepting our faith is an expensive process that costs part of our being.

Because they (1) create an exception object, (2) unwind the stack a potentially unlimited number of times

Reminder that exceptions are glorified gotos.

reminder that all you need is core dump

More like a glorified return

Stupid people need not reply to my posts

>writing code intended to fail
When will brainlets learn?

Learning Python with Think Python after getting burnt out learning C++ as my first language.

Should've just started with this language from the beginning.

brehs how to write a schell script where the file name can specify a certain code and it tells an
RESTful API what to get?
nano uniTree.sh [GN]
where GN is a code for a gene e.g. INS.

if this GN changes when i run the file
./uniTree.sh GN then it will retrieve a diferent gene from the database?

what do?

Yah, C++ might not be the best beginner language. It is great to work with though, I'd recommend returning to it after you get a good handle of the basics.

Can someone explain to a retard in what situations I would use a for, while and do loop over each other? I'm pretty new to coding and I find websites don't really offer practical explanations, just technical

Python is a bit trash and really only exists to coddle people into programming. Learn C# if you want a balance of usefulness and accessibility (it's harder than Python and easier than C++)

for with iterating through elements
do whiles for do THING until CONDITION
be cautious with plain while loops, as you should rarely ever need them.

Alright I'll just write while loops off in my head for now, thanks

for for iterative looping aka loop when you know the begin and the end of the loop
while for keep looping while a condition is true
do is like while but the condition check is at the end of the loop.

C++ is obnoxious about its type safety, sometimes. Like needing to explicitly static cast a void* to a type, or lack of implicit void* casting with function calls. I also run into strange things with anonymous unions declared in classes being "ill formed". I don't want to initialize it, or need to. Sometimes a union is just a bunch of pointers to different sizes, so I don't have to write reinterpret_cast everywhere, or make a special using alias.

>do is like while but the condition check is at the end of the loop.
What's the significance of the condition check being at the end of loop? I read that before but didn't really understand what the point was.

so like you have a loop for input validation
you have to get the input first and then check the input.

The check is at both the beginning and the end for all loops, there's no difference between the two. The only exception being do while loops, which guarantee the do statement will be executed at least once. In that sense from an assembly point of view, the condition check is at the end of the loop body.

First things first: speak English. Think about exactly what it is you want to do, and use words that convey your intentions. For instance:

>where the file name can specify a certain code
What does this mean? What kind of code?

>it tells an RESTful API what to get?
So you want to communicate with an HTTP server to get... something. Be more specific here.

>nano uniTree.sh [GN]
If you pass two filenames to nano as arguments, you will have it edit two files in sequence. Closing the first opens the second for editing.

>if this GN changes when i run the file ./uniTree.sh GN then it will retrieve a diferent gene from the database?
So now we're talking to databases?

What all is this script supposed to do? What kinds of data does it operate on? What does its output look like?

I learned C++ as my first language when I was 14 years old. Are you kidding me?

not everybody is a sepples it seem.

>The check is at both the beginning and the end for all loops, there's no difference between the two.
Oh, and by this I mean from an abstract point of view. A for loop might have instructions for its check at the start of the loop, and at the end (jump if not zero, a compare with some other register, or whatever), or it might not. It depends. Generally it won't jump to the head of the loop for the check, then down below it again if the condition is met. I can't imagine a compiler would generate that even with a minimal binary size optimization setting, though I never tested.

eat pig shit.

so this script has to get a file from a database. the file is from a query and contains genetic data.

nano

wget -O uniprot.org/uniprot/?query=reviewed:yes AND taxanomy:"Mammalia
[40674]"+AND+gene:$1&format=fasta&compress=no"

yeah i need help with the arguments or something. is the GN changes. it will retrieve a different gene from the database

Learning peaks from ~13 to 20. It seems to be downhill from there, whether in a mechanical sense, psychologically, or just lack of time / energy. I'm only 23, though I have lots of problems, I've begun to notice this. My memory is quite grand, but I've acquired a deep terror of compartmentalization and using certain mental functions and thought patterns. This hinders learning. I also feel like everything is either a lie, misframed, or net false via delusion. Luckily highly technical fields don't suffer from this like medicine, neuroscience, and molecular biology.

back to pol

back to redd1t with you

Learning not skill.
One big advantage to being an old fart is that you have already made a few thousand mistakes, and can see the same mistakes coming in new situations.

>Le maymay frog
I think you're the one who needs to leave, redditor.

JIDF GET YE BEGON

23 too. My memory is shit and I'm terrified of memorization. I unknowingly ended up in a field that is nothing but rote memorization, it's torture and when I graduate I'm gonna print out whatever the fuck I need and look it up. I still program because it's the only way my mind can be free and I learn new things pretty much every day. I don't ever want to stop learning.

>I also feel like everything is either a lie, misframed, or net false via delusion
>Luckily highly technical fields don't suffer from this like medicine, neuroscience, and molecular biology

Funny, I'm involved in all that and I have the exact same feeling. Everything people have always "known" about the body? It's horseshit, based solely on the fact there's no article that "proves" it. How the fuck do you prove causality when research involves telling people to do something harmful like smoking for years while another group doesn't, and then assessing the damage? Or giving women hormones while another group gets placebo while we watch for cancer, and eventually have to stop the study because the cancer rate is off the charts? Very few studies are this great, most of the evidence is really just statistical correlation between variables using data collected in questionable and limited ways. It's a world of uncertainty where everything changes before you're even out of medical school and invalidates whatever it is you learned in the middle years. Why even try? I'm just waiting for these folks to get their shit together so I don't have to waste time with useless crap.

That feeling of understanding the world you get from physics doesn't fucking exist here, it's just memorizing which signs correlate most strongly with disease and which treatments are best for the patient. That's literally what medicine is. The patient presents with a constellation of symptoms and signs, doctors match that using their knowledge and experience, and they treat. A computer could do this. A computer SHOULD do this.

Learning scala with a book, trying to get good enough to deploy a web application with it using the Play framework.

>Learning scala
but why

Is this book worth reading? Will it help me write safer C?

Wrote a webcrawler to download doujins from nhentai.

Gonna go fap guys cya later

No and no.

>A computer could do this. A computer SHOULD do this.
They used to. Expert systems. Look up MYCIN. It performed better than human experts.

>javascript
Get out

This book is really good as an intro to network security. Don't expect it to be a deep dive into secure coding practices.

wut

Java is so comfy! 0x0.st/FFa.java

What would you recommend?

i'm working on a basic hello world program but in arabic. it's taking me a while.

Literally anything else. Every webcrawler on the planet isnt using the DOM and just parses the page.

GO HARD

>but in arabic
excuses.

because I already know python and don't like it

>nano
What the hell are you doing with nano here? Why are you passing, what I'm presuming is a command line argument for your script, as an argument to your text editor? Moreover, < and > are for redirecting stdin and stdout respectively. So you're taking the file filename.sh, and redirecting its contents into the stdin of nano, opening some file caled GeneName[GN], and redirecting stdout to basically nothing.

Have you ever used a shell before in your life?

They're asking for help. The last line is superfluous at best.

Yeah I've heard of this system before.

jamanetwork.com/journals/jama/article-abstract/366606

It even calculates the certainty of the diagnosis, no one I know really does this. They just know things when they see it, they just know when the patient's history triggers enough neurons in their brains. Medicine is just repeating and repeating until your neurons trigger too.

These days people seem to favor machine learning. It's the new artificial intelligence, I guess. One programmer here lost his child to sepsis and got mad enough to tackle the problem. He made a system that identifies early signs of sepsis and just gave it away to the hospital. When they tried it, they found it reduced fatalities by like 30% or something. It's becoming popular all over the country, my city's hospital is adopting it.

It's basically a program that gets "anxious" when it feels that a patient is becoming septic and tells the doctors to go check on them by writing their room ID on a big screen everyone can see. How fucking awesome would it be if we had one of these for everything

Things can be good. I just don't know how to convince these fools that it can be done

>I just don't know how to convince these fools that it can be done
$$$$$$$$$$$$$$$$$$$

>Things can be good. I just don't know how to convince these fools that it can be done
I'm guessing it never or will never take off because it touches on deep philosophical issues. Like who is the real doctor, and who is responsible for misdiagnoses and deaths, etc.

Modern medicine is corrupt and at the point when it can be called unscientific trash. It is not evidence based. Unfortunately replacing the doctors just shifts the control structure onto the programmers, and likely, they would be just as deluded and just as bought. Research and implementation would have to be guided by a neutral general intelligence.

On wikipedia it says Mycin wasn't really used because it was poorly integrated. It makes total sense that nobody used it. It required the doctors to answer the program's questions, nobody is gonna do that in real life.

You know what my dream is? A fucking IDE for doctors. I just type my shit in and it starts parsing everything and figuring out the maximum amount of information out of what I wrote, in real time, as I write it.

Typed in kg and cm, I want it to automagically figure out the BMI. Typed in creatinine value, I want the glomerular filtration rate. Because it's really annoying to have to do all this crap by hand every single time. Most of my professors have apps with a fuck ton of medical calculators on their iPhones. Just integrate that shit into the EHR system somehow.

Look up the words I'm typing. If I'm typing heart symptoms, start pulling up a curated list of evidence. Bring the evidence to me so I can be sure and even record what my conduct is based on right on the patient's chart. Bring me the most recent medical guidelines published by the organization. Show me those algorithms, help me apply them by figuring out the data I've already entered and showing me what I forgot.

One day, I am going to create this fucking thing

They already tell themselves that "even if it could be done, nothing's gonna replace human care anyway because people look to humans" as technology slowly creeps into the field. Last year I went to a telemedicine conference hosted by my country's medical board (or whatever you guys call it), they know there's no turning back.

I don't really know.

I have a professor who's a lawyer, he'd say that machines would just become our tools, and we'd still be the ones responsible. So if you somehow make a machine/program that can be proven to be more effective than everything else at identifying or treating something, NOT using it becomes gross negligence.

> nothing's gonna replace human care anyway

Human doctors will eventually just become proxies to the machines that do all the real work until we eventually streamline the whole entire process. Though, that's probably atleast a century or two off.

>I have a professor who's a lawyer,
Honestly, whether or not we embrace expert systems depends on how easy it will be to find someone to sue for bad decisions.

I’m doing swift playgrounds. Never programmed in my life before. We‘re all going to make it bros!

God I really fucking hope so

Given how often software companies get away with producing absolute garbage software that's insecure and gets cracked and causes the private information of millions to leak or get sold, I guess we'll keep suing doctors for a long time

>Given how often software companies get away with producing absolute garbage software
You agreed that it wasn't their fault when you popped open the shrink-wrapped package, user.
Just kidding. I'd love to see a Professional Engineer, PE, style requirement for "Software Engineers." I'd have to cram like hell to pass one, since it's been a long time that I was in industry not education, but making people personally and professionally responsible for software quality might get us better, that is, more secure, software.

Just some tedious fucking shit, anons. Thinking it might just be easier to refresh through unti a captcha that has already been mapped is found, instead of trying to be ash ketchum

or you know just use the old captcha

>vehicles 2
EVERY FUCKING TIME

...sigh, what now? You can access the old captcha?

You do realize all medical equipment is software-controlled, right user?

oh you poor baka.
install Sup Forums x

Nice get, and RIGHT? THAT MOTHER FUCKER IS A RATTATA

What is that OP image?

I don't know if "spoon-feeding rules" apply here, but does anyone know where I can get the answer key for the Scrum Master I certification test?

I don't want to blow another $150

Just had a flashback to the pre-captcha days. There was more spam, but in many ways, those were better times.

>Sup Forums x

MOTHER FUCKER I AM actually okay with this revelation. Thank you gentlemen scholar based user

no problem lad
also youll be able to use alt-s to sage and alt-c to put code tags.

It's gonna make us all richer too. Look at all those fucking rich tech millionaries, making metric tons of cash on top of their broken shitty software. Their negligence puts all their users at risk, yet they take zero responsibility for their software. Time to hold them accountable. Time to go after their money. That's the only thing that matters when you sue anybody to begin with: money paid in reparation for damages.

The second you start fucking with people's pockets, shit gets real. Problems can no longer be ignored. Threatening to do a little wealth redistribution's more effective than prison.

I think it'd be neat to start doing this once the IoT fad reaches it's peak. Companies are adding computers bundled with shitty insecure software to everything under the sun. Shit's gonna be profitable alright.

Not all equipment. The stuff I carry with me isn't. The computerized tomography machine obviously is.

Software defects in medical machines have directly caused injury to patients before:

en.wikipedia.org/wiki/Therac-25

I dunno what happened to the engineer or the company in question but if a doctor had screwed up this badly you can bet your ass he'd be shelling out hundreds of thousands of dollars to pay for damages and his license to practice would be threatened to say the least.

Exactly my point. One example, from 1982 and just six (6) patients were affected. There's a world of difference in quality control between medical equipment and your consumer webapp.

The nostalgia I'm experiencing right now m8, it's quite amazing. Can fucking cache the captcha too? good lord man this makes my job so much easier now.

>this makes my job so much easier now.
you better not be doing anything nefarious you delinquent.

Someone give me an idea for a medium to large project pls

Nope, though I'm surprised someone hasn't already with this.

I simply want to bypass captcha all together for personal use, don't want that shit getting into normie hands.

how does Sup Forums-x let you bypass captcha altogether?

Make a program that would convince me not to kill myself?

>I simply want to bypass captcha
good luck outsmarting the google engineers who designed recaptcha.

The Internet of informants makes me want to scream, but I'll bet dollars to doughnuts that people demand it within an generation.
I lost out on an interesting embedded software job when I asked a senior manager, "What happens when your records of every bit of wine poured by a client are subpoenaed by a divorce lawyer?"

>he doesn't use legacy captcha

How is iteration over every element of a hash map usually implemented?

Do you simply walk across the array of buckets and simply select every bucket which isn't empty? Isn't that inefficient when there are a lot of buckets?

Create a social media platform so you can meet more Muslims

>he doesn't know legacy captcha still uses recaptcha

RIP

It doesn't, it now makes what I was working on with recaptcha 2 completely irrelevant as there's already bypasses for crecaptcha 1.

Are you serious or being ironic? I'm a borderline noob and could bypass recaptcha 2 kek, it's just tedious as my pic related shows.

All it entails is regexing all tiles, determining the type of picture and building profiles for the most common ones. Cars 1 is visible? Invoke click all appropriate tiles that you mapped previously to match.

Beginner shit.

>tfw you remember the days when you could post without captcha

>tfw 90% of the thing you see is spam

bumping. anyone got the psm 1