Dpt

What are you working on Sup Forums?

old thread ->

Other urls found in this thread:

jetbrains.com/
pastebin.com/GVdL30B1
en.wikipedia.org/wiki/Shunting-yard_algorithm
ma.tt/2016/10/wix-and-the-gpl/
nntpchan.info/
programming.witheve.com
twitter.com/NSFWRedditImage

I just had a bad semester. My GPA went from 3.2 to 2.7.

I was doing really well until the start of last semester. I was getting lots of A's, and I got a high exam mark in a course I was struggling in.

The problem is that university is basically my whole world right now because I am doing it online. I flunked out of SENG in physical university and got banned for 3 years, and my only alternative was to do CS online. One of my friends immediately unfriended me on Facebook when he found out I wasn't coming back the next year. That was a huge blow, because i really liked him and we had similar personalities. The one who stuck with me is a bit of a Chad.

I have pretty much been hold up in my room for a year now, studying and gaming. I know what you are thinking, "He must be gaming all the time, so he's failing," but honestly, from like January to July I didn't touch any games. It wasn't some kind of nofap asceticism, I had just lost interest. Then, August came, and I had booked my first exams, but at the last minute, I backed out of them because I knew I was going to fail. I thought if I put in an extra month of study time it would make a difference, but it didn't. I started gaming again (multiplayer Minecraft autism), probably because of the dread of *knowing* I was going to fail two courses out of three. I also got drunk once, for the first time in like 2 years. I binged on beer after every exam to take the edge off.

I'm doing work experience, but instead of a sexy internship at one of the big 4, I am just doing work for some guy who put up an ad on the internet. He needs a mobile app built, and I'm making it. I've been clueless from day 1, and it's in a language I never used in uni. I am self teaching everything instead of learning from people who know what they are doing. It is nerve wracking, and I hate it.

My advice for Sup Forums is to not do online CS, ever. Figure out a way to go to a physical school, even if you have the discipline for online.

RIP

The worst part is the asynchronous sleep. It has been bothering me for months. There are rarely two days in a row when I wake up at the same time, and sometimes I get reversals so I wake up when the sun is setting and go to sleep in the morning.

class Node
{
Node next;
int data;

public Node(int d)
{
data = d;
}


class Node
{
Node next;
int data;

public Node(int data)
{
this.data = d;
}

Are these the same thing? I see the latter more but I want to understand the use and styling behind it.

get up every day at 5:30am, eat a light breakfast, shower, and get out to a coffee shop or library
i'm not saying it's easy

i have a 3.9 gpa

Build some impressive projects and understand that internships are about 10x more impactful than GPA. INTERNSHIPS ARE EVERYTHING. People only give a fuck about GPA if you have 0 experience.

I've went way below 2.7 user, it's really not relevant.
Just make sure you improve your skills and don't fail out.

one advantage of "this" is that you don't have to invent some dumb new name for the parameter to the constructor. this.data = data.

They are the same thing.
The syntactic rule is that if X is not in the local variable scope of the method, but X is a member of the class, then the expression 'X' becomes syntactic sugar for 'this.X'
The rule exists because people are too lazy to write 'this.' each time, but accidentally "shadowing" your members is pretty nasty, so it's a good idea to use 'this.'
A lot of times it is logical for contructor arguments to have the same name as the member variables, so you are required to use 'this.', for instance.
class Point {
float x, y;
public Point (float x, float y) {
this.x = x;
this.y = y;
}
}

The alternative is to rename your constructor arguments

class Point {
float x, y;
public Point (float initX, float initY) {
x = initX;
y = initY;
}
}

Best to just consult the project's style guide to see what is supposed to be used.

good for you

that's what I thought.

so literally 0 difference in the memory aside from storing a different name for the variable?

meant
this.data = data for the second block line, just a typo. you are forgiving user

No matter what, but i will do the logo.

No I will do the logo.

/this/ refers to internal variable defined in the class definition. Not sure if the first example compiles without warnings or errors. Think what would happen if in the first example you had data = data, it would do nothing. Also, in the second example it should read this.data = data.

Are the JetBrains IDEs any good?

yes ,jetbrains really good software company soon to dominate the industry.

you have IDE's for every languag (at least , the important ones)

jetbrains.com/

Yes, worth the money? Depends on how serious you are.

Students get them all for free or you can just pirate them

This is true, in that case, go for it.

Why would anyone want an IDE that's not VSCODE?

In a job interview for java, will they give a fuck if I do it all in the main class with static methods or will they prefer a separate class with its own object instantiated.

I don't mean complicated OOP implementations either. Just when producing a few functions and fields.
Not sure what's really proper.

>vscode
>ide

less ambiguous if the argument to the function was 'data' rather than d.

Depends. There's a difference between asking you to do fizzbuzz and asking you to implement a linked list with some interface.

yes, worth the money. things like the quick git file diff lookup is invaluable.

1. it's not an ide
2. why spend hours setting it up and downloading all the good plugins and getting them to work with each other just to get a basic ide experience when instead i can just download rubymine and have it all out-of-the-box?

>jetbrains.com/
i like the part where you felt the need to include a link to their website... shill

lets all just move to bloodshed dev-c++

The Community Editions are great too.

>work using ORM for all queries
>for some reason this ORM can't deal with dates very well
>need to use a raw query and then recreate the object so that the front end doesn't have to be changed
>mfw trying to do the job of an ORM

this is the stuff of nightmares. This object is fucking huge.

Working on my terminal emulator, today I just switched to using it, so I'm working on my terminal emulator through my terminal emulator.

I'm about to start doing some more extensive profiling to see where I can improve performance.

One thing I know I will have to do is batching full screen renders that happen too fast, which happens when a lot of text is inserted (for example running `yes`).

never reinvent the wheel
if you are using the technology i like and running into a flaw, simply redesign your application to not use the broken part :^)

Kind of what I expected.


I use the .split function on strings in at least half of string manipulation questions.
Do employers give a fuck? Don't know how manual they want the problems to be done.

Split function is so based.

>not solving everything with a shell

pls

>shell
Do explain user.

Doing a free trial of Mathematica 11 to see if it's worth the price but so far the answer is no. The neural network features are fun but don't really seem extensible enough to do anything new with, you can't even define new activation functions as far as I can tell. Also they're shipping with an outdated version of CUDA that can't handle the 1080's compute version and it doesn't seem like there's a way to change it so I'm CPU bound.

Sucks because as usual they've developed a really nice syntax around nets that makes for really fast prototyping and testing. Maybe 11.1 will be worth another look.

this is always the story with wolfram, it seems to me
what do you think their notebook offers that others don't?

>what do you think their notebook offers that others don't
Basically everything. Jupyter and the like simply do not compare. It's probably the nicest programming environment I've come across.

This bullshit took me way too long and is pretty poor in efficiency.

Just a calculator where you input formula through a String and it follows order of operations (just has + and - operators) and obeys parenthesis.

I seriously hate coding when I know their is a much better and faster way to do things. I feel it with every line.
Guess that's how one gets better. Sometimes I just stare at the monitor trying to avoid the shitty code.

How do I become Carmack?

IFS=';' read -ra ADDR

does using a machine learning framework require programming?

just using a framework? not really

looks like you have some machine learning to do yourself, user

for anything half good, absolutely.
you should at least know some differential equations too.

you can probably just have a python library hold your hand to create another basic piece of bullshit.

so the research internship i'm doing this summer is useless in terms of my resume

Not at all. Just bullshit like everyone else does on your resume.

Very few people DON'T do it. You'll get a question or two max about your past internships.

So you didn't even use a parser to handle it?

i'm kind of feeling a rising sense of panic. thanks

math that respects order of operations is classically done iwth parse trees.

what do you mean by parser?

I do have a method that will handle the basic arithmetic strings, that's the trivial part. Getting the parenthesis and their scope was tricky for me, especially when trying to be efficient.

Kek

your post contributed a lot user
we thank you

I made a thing.
pastebin.com/GVdL30B1
From the pro/g/ramming challenges, the one where you change numbers to text.
Took me some four days to do it. I spent more than a day figuring out how to add the appropriate number of spaces.

Ooh, what language and how are you going about this?
I've never tried making one of those.
The way I'd do the parentheses is look, from left to right, for a closing parenthesis and then do the arithmetic between that closing parenthesis and the opening parenthesis before before plugging it back in and going to step one... which it looks like you did.
Also, with Java at the very least, because String is immutable, you can use StringBuffer or StringBuilder as mutable versions of String (which cuts down on runtime).
Or something. I helped my sister with her Java homework. That's the only reason I'm aware of that.

Yep that logic is exactly how I did it.
I figure I should be able to apply all of the innermost scoped parenthesis at the same time.

I'm actually using java, and should really get in the habbit of stringbuilder.

Next time use arrays of strings instead of horrible switch cases. Didn't bother to read further, wouldn't hire.

en.wikipedia.org/wiki/Shunting-yard_algorithm

If you care for efficiency and getting better, you should look a bit into theory.

In this case into grammars. The whole Term is representable as a tree, with _Term operator Term_ as nodes, where a Term can be either _Term operator Term_ again or just a value, with brackets here and there. A program that transfers the string into such a tree via a grammar is called a parser.
From there you have several options, inline transformation, where you delete a value operator value substring and replace it by its result, or some others, like making a real tree in memory and reduce value operator value pairs to values in a depth first search. Inline transformation is a bit faster.

Also it's normal that you don't really like your first programs, you're not alone there.

This is some fucking crazy shit but it's blatant how it is more effective.
Will study this, thanks.

Hey folks, I'm learning java, why is this piece of code throwing me random bullshit? It should read a csv file line by line and print out each of the lines.
br = new BufferedReader(new FileReader(csvFile));
while ((line = br.readLine()) != null) {
poleorig = line.split(csvSplitBy);
System.out.println(poleorig);
}


When run, it outputs bunch of lines with "[Ljava.lang.String;@d93 etc"

shan't be reading this

Barely, only enough to load a csv and call a sklearn function. Doing anything worthwhile with ML requires a decent amount of skill though.

>thinks differential equations are required or even useful for machine learning

Linear algebra, differential calculus, statistics are important. What algorithms need diff eq to be understood or implemented? one of the last pieces of undergrad math I think of when I think machine learning.

>cancer-256color.
heh

whats up with the line numbers ?

Someone said yesterday that SIGCHLDs are queued?? Is this true.??

>java.
either this is for college/uni.
if not. for the love of chin chin. switch to c++ or python.

Huh? Differential Equations is calculus. It's literally described in calculus. What country are you in?

They are also very applicable in machine learning. My DFQ course also had eigenvalues, PDEs. I thought that was pretty standard. All useful in machine learning, it's a field wide in scope.

Statistics are important for ANYTHING computers, and yeah of course linear algebra too.
I could see your arguments but I still think differential equations is essential to do anything significant.

I'm writing a textboard in Python, and for the last day I've been replacing all manual SQL queries with SQLAlchemy (ORM library). It's condensed the code a bit, but other than that it's looking a lot more "wordier" and generally more difficult to understand (in my opinion) than plain SQL queries. When should I use one over the other?

I've been half-arsedly messing around on the C++ bits of Codewars.com over the past few weeks, has anyone else used it before? Is it worth sticking with into the higher levels?

anyone have the book tier list? i need to top off an amazon order

>use arrays of strings
Huh. Never occurred to me. Would've solved the problem of the ass-load of switch cases which, although didn't seem to cause delay, bothered me.

>Didn't bother to read further, wouldn't hire
Funny that. That's what every potential employer's said so far.

Is this possible to convert HSL to RGB with the preprocessor in C++?

>C++
constexpr

>constexpr
.. Thanks!

My C process time sharer works
wew

I'm learning how a perspective matrix works.

Does anyone have trouble getting their head around recursion?

##Least Common Ancestor
public Node getLCA(Node root, int n1, int n2) {
if (root == null) {
return null;
} else {
if (root.data == n1 || root.data == n2) {
return root;
}
Node left = getLCA(root.left, n1, n2);
Node right = getLCA(root.right, n1, n2);

if (left != null && right != null) {

return root;
}
if (left != null) {
return left;
} else if (right != null) {
return right;
}
return null;
}

}

I can BARELY understand how the above works, just a hair of connection where I understand the full process.
I can't ever imagine actually writing a recursive function beyond the 1st year bullshit. Anyone have good advice or tutorials?

>mfw another millennial gets btfo by my license

ma.tt/2016/10/wix-and-the-gpl/

You just have to train your neural net.

Recursion is literally a function calling itself. What don't you get about that? You can do some neat complicated shit with it but the concept of recursion isn't complicated itself.

Remember the last time you had sex. Some guy had his penis jammed in your ass. Your penis was in another guy's ass. His penis was jammed inside the ass of the man ahead of him and so on.

This is called "tail recursion".

Anyone got a suggestion for a bachelor's project involving medicine?

it creates a new stack frame

Just take a piece of paper and write down what your recursive function does step by step for some small parameters. That helped me to get my head around it.

I understand that I just have trouble coding my own recursive functions from scratch. I can understand almost all of someone else's code but to produce my own will be painfully slow. Need to be ready for interviews if they do ask for something to be done recursively that I haven't seen before.

Will keep this in mind.

This post almost makes me feel like i'm in HS again

What is poleorig's type? What is that type's toString() implementation?

They're relative numbers in vim, they allow you to see clearly how many lines to use for various operations.

Yeah, the license header is hilarious too with that name, I bet I'm gonna get shit on by a bunch of butthurt moralfags.

been working with this since late 2014-ish but it finally has a weebsite's.

nntpchan.info/

>tfw someone else made the site because I suk at weeb design

I would seriously sooner kill myself than align divs for 6 hours so that's okay.

i want to run a python script over and over (or every 5 minutes, or etc) that queries a remote database and inserts all new records into an equivalent, local database.

basically i want to know: how dumb of an idea is this? im sure there are design patterns with rigorous do's and dont's for database synchronization. however i need to get this done STAT with the tools i know.

sorry for the vague question

man crontab

why do you want to do this? the best recommendation is streaming replication, assuming your database can support it

or... put this into crontab

*/5 * * * * python /path/to/script.py

how would i know whether or not it supports it?
the remote is Azure, local is SqlLite
host is a Windows tablet

sorry... I'm not asking how to automate the script, that is trivial enough

>i want to run a script ever $interval
>sorry I'm not asking how to automate the script
go beg someone to do your homework in the retarded questions thread

i'm sorry that you can't read or understand things user

Programming is sexist because it's designed in a way that makes it too hard for womyn to understand.
By writing code you are basically declaring that you hate womyn and most likely people of color too.
You are literally raping me right now, stop raping me.

help is here
programming.witheve.com

Okay let me back up and explain the situation.
The app is a UWP mobile app that relies on data from a cloud-hosted database.

In WPF, you could always just write code using SqlDataConnection to connect to a server and query its database. UWP doesnt let you do that, it makes you connect to an external service.

Tried to figure out how to do that, failed.

My workaround was: I can write a python script in like a minute that will just query the Azure and insert into a local sqlite that I DO know how to interface with in UWP.

What I want to know is, what sort of unforeseen bullshit will this workaround land me in? In a sense I like the idea of the local DB because it's not crucial for the data to be 100% up to date to the second, and the app could still function if the internet connection goes out (which I predict it will).

Bump, I've got until December to come up with something, or I've gotta chose one of the boring ass projects the Uni. made.

I'm from nz, but I think our uni courses are structures pretty similar to US colleges?

DEs are *described* with calculus but don't seem to be used much in machine learning themselves..

The main parts of calculus I think are relevant to ML are partial derivatives/gradient operator and the multivariate chain rule, (since you have to apply those for backpropagation), which are typically taught in Calc 2/3 not DE.

I mean, eigenvalues are used for PCA, but that's linear algebra, not DEs. When do you have to solve a PDE to implement/understand a ML algorithm?

The main way I think my PDE course helped me in ML was giving me decent intuition about dynamical systems like RNNs. I'm sure it pops up sometimes, but calling it essential seems like a stretch. Is there something I'm missing?