/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

better-dpt-roll.github.io/
youtube.com/watch?v=lisiwUZJXqQ&t=3633s
twitter.com/SFWRedditImages

Lisp is the most powerful programming language.

C++ prime
one third through
800 more pages to go haha...

haha

fourth 4 forth

Reading through the technical doc for UML after watching about three hours worth of video tutorials, hoping it'll help me be able to plan something without having to refactor code because of an interaction I forgot every thirty minutes.

Yes, I'm aware it'll probably save me less time than I've used.

pls respond to my question in old thread

start writing code
if good code: keep it, goto end
if bad code: scratch it, goto begin

Trying to write a document sorting program.
But the document needs to be able to sort squished together information

First Name: BETHLast Name: Mitchel

this shit is annoying^ I'm not even sure how to sort crap like that.

Regex

Start at the beginning, search for next keyword "Last Name:" "First Name:", find nearest keyword, read until start of that and put it in a more useable structure?

C# has a version of Ragex?

but then he will have two problems

System.Text.RegularExpressions

Thats actually a great Idea.
there's like 16 attributes per person, but that will do. thanks.

Post a few full lines of your text file and what you're trying to do.

What if someone's first name is "Last Name:"?

class diagrams bro

I am writing something that is quite hard

I need to spend time building a comfortable debugging environment

gonna break out the ncurses and build a GUI

say I need a point and vector2 struct.
would it make sense to define point first and make vector2 inherit from it? (with magnitude() functions etc)
or should I just make point an alias of vector2?

Son of a bitch, when I copy pasted the first line there's line breaks.
In the txt file its all mushed together.

I can actually do this.

I'm just taking information like this

FacilityID: 12787
FacilityName: ACME Medical Center
Facility Location:
Patient: Kistra Halos
Gender: Female
DOB: 2/22/1923
PatientID: 475101
Procedure: MG MAMMOGRAM SCREENING BILAT
Number of Films: 1
Laterality: NA
Contrast: NA
Reason: BERGEN COUNTY CEED PROGRAM
ExamDate: 5/22/1998 12:19:00 PM
Radiologist: Kalaila Mayweather
Ordering Ph: Haera Mald
POS: O
ReportStatus: 1

===================END OF RESULT===================

FACILITYID: 12786
FacilityName: ACME Medical Center B
Facility Location:
Patient: Gav Brishen
Gender: Male
PatientID: 475100
Laterality: NA
Contrast: NA
Reason: Chest pain
EXAMDate: 3/22/1918 9:19:00 PM
Ordering Ph: Celes Kelbier
Radiologist: Fias Talatheen
DOB: 5/13/1982
Procedure:

and sorting it.
so that the user just types "file - filename.txt" and it all prints out neat and in order.

This is one of those times where taking into account all possible options is just a waste of time.

I'd throw coffee at you if you were an intern here.

Alright, how about this:
Copy the first few lines to an actual text document and upload that somewhere so I can test with it. If you've got line breaks or other ascii characters fucking with it, it can actually help you parse it.

>Son of a bitch, when I copy pasted the first line there's line breaks.
>In the txt file its all mushed together.
are you reading a file with unix-style newlines in notepad.exe?

That actually sounds pretty good IMHO

If anyone else thinks its a bad idea, you should probably listen to them though

Why would a vector inherit from point?

A point and a vector are exactly the same thing. You only need the vector class.

please quit thinking that way as soon as possible

both have x/y coordinates. but a point represents a fixed point in 2d space so it doesn't really make sense for it to have functions like magnitude() and angle().

should I go with the alias then?

It does if you consider point to be a vector fromvthe center of coordinates

yes, they sent it to me in notepad.exe

I wan't to learn to do this, getting someone to parse it for me won't teach me much.

No, you don't need a type for points at all. All your variables representing points should just be vectors.

Does anyone here have the things to program chart handy? I want to completely ignore it for the Official Sup Forums Funposter cert.

alright then, I'll go with just the vector type. thanks for the advice.

better-dpt-roll.github.io/

All languages should have a repl

They should be two distinct types, not any hierarchy.

they would be, but inheritance is just an easy way to clone functionality (overloaded operators etc) in this case.

go poo in loo, pajeet

If you think you don't need vector operations for a class representing points, you need to learn more linear algebra.

surely that would depend on the intended usage, user!

Even HolyC has a REPL.

Which name is better?
class CIAResource extends AgencyResource {//...

or
class CIAresource extends AgencyResource {//...

Former is correct.

You're mom should have a repl

Wrong.

Both are wrong.

CiaResource is the correct PascalCase form.

Jest use an underscore.
Because not all acronyms will be as notable, and splitting them up is worse.
>but muh standards
no

struct cia_resource : public agency_resource { };

>Jest use an underscore
Pajeet detected.

What the fuck is a cia? isn't that a fucking car brand?

Underscores are literally an anti-pajeet practice, are you a baka?

>A graphics window
> gui libraries
I'm having a bit of trouble finding good GUI libraries for OS X... There's a weird error that won't allow me to install wxWidgets on Sierra, so I'm choosing between this library called "JUCE" (not sure how good it is/how to use it and FLTK

Which one do you recommend I learn for the text editor project?

Convert 35287063389459 from base 10 to base 36.

>literally an anti-pajeet practice
Yeah, keep telling yourself that.

I couldn't be more in over my head with this shit.
Why do I suck so much at this.

>implying it's not
Yeah, keep implying that.

But muh acronym!

I suspect this is best.

I was stupid for thinking I could learn a new language in 2 days.
I'll just go to the job that has on the job training, until I'm at least pajeet level.

Are you the C with classes guy?

You can have an abstract superclass Pair or something like that, that has x/y coordinates and anything else that would be common to any object that's defined by two numeric values.

Then define the specific behavior of points and vectors into their respective, concrete subclasses.

nope, I'm the guy that was applying for a job I'm not qualified for because I'm desperate for a non-minimum wage job.

I think he might be the C# 6 levels of indentation guy.

that's me buddy.

and for the record someone else suggested the 6 levels of indentation. I was trying to do it in 1 line.

Well, hopefully it was a learning experience. It can be pulled off mind you, but it'd take a bit of bullshit and effort.

I now have to travel 2 hours out and back every day just to have a decent job. The bullshit and effort would be well worth it to have a job in my own city.

So you didn't get the job? how did the interview went about?

Didn't go to the interview yet.
Just looking at the pre-interview assignment.
I'd have syntax errors for days.

>I now have to travel 2 hours out and back every day
cars were a mistake

Poorfag. i don't have a car. i'll have to bus there and back.
Or i could cut it down to an hour if i uber. 40-60 bucks a day.

>Syntax
Excuse me what? are you one of those SJW snowflakes that go about writting extensive blog entries about how fizzbuzz is some abstract kind of math?

job training is for blue collar jobs

post the assignment and we might help you with it. not like you have anything to lose, right? either we help you or you don't apply to begin with. just make sure you don't dox yourself.

Motor vehicles were a mistake

program base_10_36;

var
base36, endnumber : string;
base10 : int64;
remainder : integer;
begin
base36 := '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
base10 := StrToInt64(ParamStr(1));
endnumber := '';
while (base10 > 0) do
begin
remainder := (base10 mod 36) + 1;
base10 := base10 div 36;
endnumber := base36[remainder] + endnumber;
end;
writeln(endnumber);
end.

pascal is such a comfy language.

I think he means just fucking up the small stuff like

include (iostream)

int main()
{
std::cout>>"butts", std::endl
}

no, I'm just sort of in over my head here. Graduated in 2014, last project was in 2015.
I'm a shitty programmer and trying to change it, but I can't change that in 2 days. especially working with a language I never touched before.

This is the assignment. Where should I upload the textfile?

The 5 hour this is weird. they said I have 24 hours to submit the the paper says 5.

filedropper

I will complete this assignment.

There are no valid vector operations you can do on points.
Points and vectors are completetly different things.

Read point 4

You think he doesn't realize that?

/medicalreports1211121111

Thank you. i will start studying c# like there's no tomorrow. hopefully I wont get fired in the first week.

This program is 20 lines of code at best, if you can't do this shit, just drop out right now.

I know, I'm sub Pajeet. i fucked up.

I mean, considering it is so easy he won't have any issues catching up to this skill level. If this assignment actually was difficult this would've been a much worse idea.

Do you not know any programming language?
I would write it in another language and then translate to C# or whatever they asked for, and then I'd scramble to learn the language before my start date.

I'm doing
better-dpt-roll.github.io/
to be less of a shitter. How far down the list would you say is about equal to this skill level?

Why does everyone condemn introducing people to programming with Python, when everyone was ok with introducing people to programming with Basic back in the 8-bit days?

What would you lads recommend an "intermediate" programmer do to improve his skills?

Pretty much all I know is the fundamentals of C# from a couple years experience working on games with Unity. I've made things like basic AI with state machines, pathfinding, and a grid-based level editor, so I'm not a complete retard.

What are some things I could do to take my skills to the next level? Any specific reading materials? Should get familiar with C or C++?

>I can't even get called in for internships
>This is the level they expect
I'm pretty upset

I would refresh datastructures and algorithms as well if this assignment doesn't scream symbol table (e.g, hash table) to you already

you need a basic understanding of file I/O, string manipulation and argument parsing.

You'd better hurry the fuck up.

We have infinitely better alternatives now. And Python teds to have the same stockholm effect as Java so its best to avoid it.

A point is just a vector without magnitude.

roll better-dpt-roll.github.io/ until you get a project you like.
And make sure its slightly over your head

I know python java and c++ pretty well.
I could probably do it in one of those, but also. I'm very out of practice.
I remember concepts and the like, but my knowledge of syntax is almost gone.

Along with that knowledge went all of my confidence in programming. I feel like I'm starting from scratch.

Noted.
youtube.com/watch?v=lisiwUZJXqQ&t=3633s
helps me understand concepts, but a 1 hour video is nothing compared to actual coding.

how to prove that the diagonal language that defaults to 0 for its own encoding is not decidable?

Build these in C++

LinkedList
BST
HashMap