Computer programming thread

This is the polite off topic forum. If you’re looking to talk smack and spew nonsense, keep moving along.

Moderators: mgil, chromoly

Post Reply
User avatar
RedFinn
Registered User
Posts: 155
Joined: Thu Oct 12, 2017 4:41 pm

Re: Computer programming thread

#661

Post by RedFinn » Sun Mar 20, 2022 12:41 pm

Skander wrote: Sun Mar 20, 2022 12:24 pm I wrote a Django based website and it did take a solid year or so from idea to fully working. I liked Django because Python is very pleasant to write in, and the documentation is some of the best I've encountered in that kind of thing- I'm not finding the Flask stuff quite as good. That said, the stuff that "comes for free" with Django is not relevant to every project, and it can be complex if you're doing something simple. I'm also not sure how good it would be for single page apps.

I have an app idea and I finally realized I needed a partner in crime - I was able to find one who can do all the front end stuff, so we're using Flask and I do a lot of the back end stuff and he does the JavaScript stuff.

Finally, you may want to try to stick to MySQL if you can. For python anywhere for example, MySQL is free to use, but postgres requires a paid account.
That reminds me, another reason I'm interested in using Django is because Python is probably the language I know best.

Regarding parts of Django, my understanding is that the most relevant part would be the Django Rest Framework, but it's probably good to spend some time understanding Django more generally before diving into DRF.

Regarding collaborators, I am also potentially interested, but you'd need to find someone with a complementary set of skills who also buys into the idea, with whom you work well, and you have to trust each other. I have no one like this but I am trying to meet people.

Never heard of Python Anywhere, but thanks for mentioning it. I used to think about running my own server but then I thought that's too much work and risk, so I'm looking into things like AWS, Digital Ocean, and some others I've forgotten right now. (And this relates to operating system choice, because AFAIK Ubuntu Server is the standard choice for servers, which means I'm planning to do a lot of the development, especially back-end stuff, on Ubuntu, because I want to avoid potential issues in migration if I were to use a different OS.)

User avatar
Skander
Registered User
Posts: 1419
Joined: Sun Mar 04, 2018 4:02 pm

Re: Computer programming thread

#662

Post by Skander » Sun Mar 20, 2022 3:39 pm

RedFinn wrote: Sun Mar 20, 2022 12:41 pm. (And this relates to operating system choice, because AFAIK Ubuntu Server is the standard choice for servers, which means I'm planning to do a lot of the development, especially back-end stuff, on Ubuntu, because I want to avoid potential issues in migration if I were to use a different OS.)
Honestly I just used GitHub to mirror the project between PA (Linux based) and my computer (windows based) and it was fine. I never ran into any OS level issues, except maybe file names. But I wasn't delving deep into stuff that wasn't basically server agnostic- everything just really lives at the Django level. I have a chron thing that backs up the database occasionally, that's as fancy as I had to get outside of that.

I agree with what someone was saying above though, about designing the user flow first. There are a bunch of sites that make this easy, and I've found it really helpful to have a visual map of the interface, especially with multiple people involved. It helps clarify what needs to be done and when. It makes me miss old school visual basic where you could sort of draw your program (I assume such things exist today but I know nothing about them)

User avatar
hsilman
✓ Registered User
Posts: 2842
Joined: Fri Sep 15, 2017 8:31 am
Age: 39

Re: Computer programming thread

#663

Post by hsilman » Mon Mar 21, 2022 4:54 am

RedFinn wrote: Sun Mar 20, 2022 11:47 am Well, I can't say I've thought a lot about that yet. But I am trying to think about things somewhat carefully before beginning to write code. I'm hoping to begin writing code before summer is over.
https://www.lucidchart.com/blog/types-of-UML-diagrams

https://www.projectmanager.com/blog/req ... ring-guide

Yeah, requirements gathering is essential to make sure what you're working on actually does the thing you want in the end. UML can help you map out a bunch of different pathways, from user interaction to the object relations and class diagrams. IE, you can map out what you expect the user experience to look like, then use that to guide your function/class creation which you can map out, and then also map out the Model-View-Controller if you go that way with the design(very typical for an app).

On really simple stuff, UML is overkill, but I find the visualization is extremely useful on larger projects.

User avatar
RedFinn
Registered User
Posts: 155
Joined: Thu Oct 12, 2017 4:41 pm

Re: Computer programming thread

#664

Post by RedFinn » Tue Mar 22, 2022 8:15 am

Thanks for the resources, hsilman.

Skander, I just remember reading about some complications in moving a PostgreSQL database from Windows to Linux due to file system differences (I think). Maybe there are ways around that, but I'm just trying to remove any obstacles that can reasonably be removed. And getting more comfortable with Linux is probably a good thing as well.

JonA
Registered User
Posts: 2138
Joined: Fri Sep 29, 2017 7:00 am
Age: 48

Re: Computer programming thread

#665

Post by JonA » Tue Mar 22, 2022 8:34 am

RedFinn wrote: Sat Mar 19, 2022 10:36 pm A couple people have advised me to to do something simpler, like trying to write a website or follow an online course first, but I'm reluctant to take that advice because I am motivated to try to implement my ideas, not to do those things.
This is the story of open source in a nutshell. Implementing your own ideas to scratch an itch is way more fun and interesting than working for the man. ;)

That said, one of the most valuable programming skills is actually simplification. Eg, can you break a complicated idea into smaller, more simpler versions and add complexity later?

Most software evolves from a simpler state. Can you simplify your idea at all? Do you really need a database from step 1, or can you just use an in memory hash map? Or save state to a text file? Do you really need a mobile app? Messing with virtual machines or side loading is kind of a PITA. Do you even need a UI or would just a CLI suffice?

User avatar
Skander
Registered User
Posts: 1419
Joined: Sun Mar 04, 2018 4:02 pm

Re: Computer programming thread

#666

Post by Skander » Tue Mar 22, 2022 12:52 pm

I'd add to check that the things you want haven't already been done. In my app, all the front end stuff consumes JSON, but I move the back end stuff around in pandas. I was getting all set to write a "pandas to JSON" routine when I actually checked first and realized there's a "to_json" routine already and I had wasted half an hour thinking about how I was gonna do that.

I was trying to think of why I don't check for existing stuff more, and I think it is a weird holdover from comp sci 101 when you're yelled at to not use external stuff. Or algorithms when you're expected to write your own sort functions, and then later you think that's how it's done, when really some genius nerd already wrote something blistering fast and all you have to do is type .sort(ascending=True)

JonA
Registered User
Posts: 2138
Joined: Fri Sep 29, 2017 7:00 am
Age: 48

Re: Computer programming thread

#667

Post by JonA » Tue Mar 22, 2022 2:55 pm

Skander wrote: Tue Mar 22, 2022 12:52 pm I'd add to check that the things you want haven't already been done. In my app, all the front end stuff consumes JSON, but I move the back end stuff around in pandas. I was getting all set to write a "pandas to JSON" routine when I actually checked first and realized there's a "to_json" routine already and I had wasted half an hour thinking about how I was gonna do that.

I was trying to think of why I don't check for existing stuff more, and I think it is a weird holdover from comp sci 101 when you're yelled at to not use external stuff. Or algorithms when you're expected to write your own sort functions, and then later you think that's how it's done, when really some genius nerd already wrote something blistering fast and all you have to do is type .sort(ascending=True)
In reality, I'm just a sophisticated google->copy->paste lambda function running in an infinite loop. :lol:

User avatar
hsilman
✓ Registered User
Posts: 2842
Joined: Fri Sep 15, 2017 8:31 am
Age: 39

Re: Computer programming thread

#668

Post by hsilman » Wed Mar 23, 2022 1:47 pm

Anaphase wrote: Thu Mar 17, 2022 12:13 pm Multivariate calculus/calculus 3. I'm probably going to get absolutely fucking bodied by the last courses I need to transfer as well: mechanics and electricity/magnetism respectively
This is unrelated, but I was reminded by something that happened in my class last night about something I want to tell you.

There are people, who got into my MASTER'S program, and are going to get their degree, who are straight up some of the dumbest people on earth. Not only are they stupid, they constantly interrupt the professor with stupid questions.

Last semester, I had someone send me a whatsapp message DURING the midterm, asking me for specific help on a problem. This was an at-home exam that we had 6 hours to complete where we could Google anything we wanted. Asking each other for answers was literally the only restriction. You could copy and paste the questions into Google and get answers that you could easily copy and paste to the exam. And this guy couldn't handle that.

So, don't worry. You got this. If you can tie your shoes, you're ahead of at least 50% of the class.

User avatar
RedFinn
Registered User
Posts: 155
Joined: Thu Oct 12, 2017 4:41 pm

Re: Computer programming thread

#669

Post by RedFinn » Thu Mar 24, 2022 12:14 pm

JonA wrote: Tue Mar 22, 2022 8:34 am That said, one of the most valuable programming skills is actually simplification. Eg, can you break a complicated idea into smaller, more simpler versions and add complexity later?

Most software evolves from a simpler state. Can you simplify your idea at all? Do you really need a database from step 1, or can you just use an in memory hash map? Or save state to a text file? Do you really need a mobile app? Messing with virtual machines or side loading is kind of a PITA. Do you even need a UI or would just a CLI suffice?
I am aware of the difference between 1) all the features I might possibly want, eventually, and 2) the minimal set of features initially necessary to create something useful. I am trying not to bite off more than I can chew, given my inexperience and limited man-hours. As I mentioned, this affects not only the features and design that I initially choose, but also the tools that I select for the job. I have noticed that there is some tendency among tech people to be attracted by shiny, new pieces of software, and I think it's important that I avoid this.

I find that I need to exercise my judgment quite a bit, and I'm just in the research and design stage. Making the wrong choices could mean that the time until Version 1 is created could drastically increase---perhaps I'd never even get to that point. My judgment is unfortunately imperfect but I'm spending quite a bit of time planning, before beginning to write any code, in order to try to avoid any obstacles that are reasonably avoidable. For example I am concerned that I might choose certain tools for the job and then a year later, realize that these tools won't let me create crucial feature X. Then what? I would have wasted a bunch of time. I am trying to avoid errors like this. Also, as you mention, trying to create something too complicated is another potential pitfall. I also don't want to fall victim to "analysis paralysis" and still be in the research stage 5 years from now.

So... yeah. Not a trivial undertaking. I'm trying to get in touch with more knowledgeable people, for advice at least.

User avatar
Skander
Registered User
Posts: 1419
Joined: Sun Mar 04, 2018 4:02 pm

Re: Computer programming thread

#670

Post by Skander » Thu Mar 24, 2022 2:41 pm

This is just a rant, but trying to update my 7 year old Django site is absolutely driving me insane. Choosing to use all the GIS stuff when all I really needed to do was store lat-long was a really stupid choice...*slams head against wall* - I think it's 90% that stuff that is triggering the vast majority of stupid errors that make no sense. But it sure would be nice if error codes were more informative. I'm starting to wonder if I could just outsource it to someone abroad so I don't have to do it anymore...

User avatar
Skander
Registered User
Posts: 1419
Joined: Sun Mar 04, 2018 4:02 pm

Re: Computer programming thread

#671

Post by Skander » Fri Mar 25, 2022 7:24 am

By the way @RedFinn this GIS stuff is a great example of where doing less would have made my life easier: my app doesn't actually really do any GIS stuff, just stores lat-long and renders that to a map. I aspired to do something more complex, but it never panned out. But by trying to use the "correct" way of doing things with GIS stuff significantly increased the complexity of everything, forced me to use postgresql instead of MySQL, which increased hosting costs significantly. And in the end, I am gonna have to do some annoying database migrations and code changes to simplify my code and database. I just think you can't anticipate everything, so it's best to be flexible with the development process and plan for mistakes to be made.

User avatar
RedFinn
Registered User
Posts: 155
Joined: Thu Oct 12, 2017 4:41 pm

Re: Computer programming thread

#672

Post by RedFinn » Fri Mar 25, 2022 10:04 am

Skander wrote: Fri Mar 25, 2022 7:24 am By the way @RedFinn this GIS stuff is a great example of where doing less would have made my life easier: my app doesn't actually really do any GIS stuff, just stores lat-long and renders that to a map. I aspired to do something more complex, but it never panned out. But by trying to use the "correct" way of doing things with GIS stuff significantly increased the complexity of everything, forced me to use postgresql instead of MySQL, which increased hosting costs significantly. And in the end, I am gonna have to do some annoying database migrations and code changes to simplify my code and database. I just think you can't anticipate everything, so it's best to be flexible with the development process and plan for mistakes to be made.
Part of my interest in PostgreSQL is because of PostGIS, but I admit that I don't understand much about it. I need to see whether basic PostgreSQL or MySQL are able to do basic geometric and spatial things. Lots more reading to do.

Why would PostgreSQL increase hosting costs versus MySQL? I'm not aware of AWS charging different amounts based on this, but I haven't looked much into it.

User avatar
Skander
Registered User
Posts: 1419
Joined: Sun Mar 04, 2018 4:02 pm

Re: Computer programming thread

#673

Post by Skander » Fri Mar 25, 2022 11:51 am

RedFinn wrote: Fri Mar 25, 2022 10:04 am
Why would PostgreSQL increase hosting costs versus MySQL? I'm not aware of AWS charging different amounts based on this, but I haven't looked much into it.
That's specific to the hosting service I'm using, ymmv.

User avatar
hsilman
✓ Registered User
Posts: 2842
Joined: Fri Sep 15, 2017 8:31 am
Age: 39

Re: Computer programming thread

#674

Post by hsilman » Fri Apr 01, 2022 8:11 am

I hate automated technical assessments. I don't mind getting asked a question or two during an interview just to make sure I'm not completely bullshitting my resume, but I just don't understand how seeing if I have memorized the solution to some puzzle will translate to my ability to learn/contribute to your codebase.

I understand some of the really desired companies like Google using it as an arbitrary weeding out of candidates since they can already hire the top 1% at will and you have to have something(not really, but still), but everyone? Why? Ugh...

User avatar
5hout
Registered User
Posts: 1556
Joined: Wed Jun 26, 2019 5:32 am

Re: Computer programming thread

#675

Post by 5hout » Fri Apr 01, 2022 8:40 am

hsilman wrote: Fri Apr 01, 2022 8:11 am I hate automated technical assessments. I don't mind getting asked a question or two during an interview just to make sure I'm not completely bullshitting my resume, but I just don't understand how seeing if I have memorized the solution to some puzzle will translate to my ability to learn/contribute to your codebase.

I understand some of the really desired companies like Google using it as an arbitrary weeding out of candidates since they can already hire the top 1% at will and you have to have something(not really, but still), but everyone? Why? Ugh...
Hiring practices aren't about finding best candidates, or even a reasonable candidate, but about having the most defensible process vs internal threats (people wanting to devolve hiring back to managers with limited HR support) and external threats (people suing the company for bias, cartel behavior, price fixing)*. That kind of nonsense crap has flash brochures and looks really good to executives that have been away from actual work for too long (or never did actual work) and is great in defending vs allegations of bias/price fixing.

It's possibly I've crossed a cynicism horizon here. I've never talked to an engineer or programmer who thought they were worthwhile though. Maybe if you're hiring at a startup and asked novel Fermi problems (but this would be non-automated so not what you're rightfully complaining about) and then actually listened to the answer... Even that seems like a waste of time b/c once you've learned how to attack those you can reasonably do any of them within your realm of knowledge.

User avatar
hsilman
✓ Registered User
Posts: 2842
Joined: Fri Sep 15, 2017 8:31 am
Age: 39

Re: Computer programming thread

#676

Post by hsilman » Fri Apr 01, 2022 8:55 am

5hout wrote: Fri Apr 01, 2022 8:40 am
hsilman wrote: Fri Apr 01, 2022 8:11 am I hate automated technical assessments. I don't mind getting asked a question or two during an interview just to make sure I'm not completely bullshitting my resume, but I just don't understand how seeing if I have memorized the solution to some puzzle will translate to my ability to learn/contribute to your codebase.

I understand some of the really desired companies like Google using it as an arbitrary weeding out of candidates since they can already hire the top 1% at will and you have to have something(not really, but still), but everyone? Why? Ugh...
Hiring practices aren't about finding best candidates, or even a reasonable candidate, but about having the most defensible process vs internal threats (people wanting to devolve hiring back to managers with limited HR support) and external threats (people suing the company for bias, cartel behavior, price fixing)*. That kind of nonsense crap has flash brochures and looks really good to executives that have been away from actual work for too long (or never did actual work) and is great in defending vs allegations of bias/price fixing.

It's possibly I've crossed a cynicism horizon here. I've never talked to an engineer or programmer who thought they were worthwhile though. Maybe if you're hiring at a startup and asked novel Fermi problems (but this would be non-automated so not what you're rightfully complaining about) and then actually listened to the answer... Even that seems like a waste of time b/c once you've learned how to attack those you can reasonably do any of them within your realm of knowledge.
I think they can be asked in an interview if they are small and not gotcha puzzles, just to establish base competency and probably just for new hires. I understand that there are a lot of terrible schools and terrible students who either lie about having a degree or managed to not even learn the basics while passing their classes. As I've mentioned a few posts ago, I go to school with them so I know they exist lol

But it shouldn't be automated because explaining your thought process is more important than getting the right answer and they shouldn't be the gatekeeper for getting an in person interview because they aren't a good assessment of potential hires. But I understand the desire, as you said, to have some kind of unbiased process they can pretend is useful.

User avatar
EggMcMuffin
Registered User
Posts: 574
Joined: Mon Apr 20, 2020 9:32 pm
Age: 28

Re: Computer programming thread

#677

Post by EggMcMuffin » Mon May 16, 2022 3:47 am

Retail work is literally making me *focken* suicidal. I want to graduate already but am not even sure how sure of a bet that is to escaping the dystopic nightmare that is the lower echelons of wage labor.

I feel like I'm just going to find the same thing I'm running from, but better paid, if I can find it at all.

What I'm lacking is a roadmap. Focus on school etc. but I constantly feel like I'm not really doing enough. I feel like I should be studying INTENSELY outside of class on DS&A problems and trying to build cool shit but I find the motivation isn't really there, in spite of the fact that I innately know that doing extremely menial, demeaning work for the rest of my life is basically a recipe for actual suicide/living under a bridge for someone like me. Not that I think anyone should have to do this shit, but goddamn.

User avatar
mgil
Shitpostmaster General
Posts: 8483
Joined: Wed Sep 13, 2017 5:46 pm
Location: FlabLab©®
Age: 49

Re: Computer programming thread

#678

Post by mgil » Mon May 16, 2022 4:01 am

@Anaphase, have you looked into internships and/or contacted people who have recently graduated and are using their CS degree?

I’ll be honest here, if you’re not seeking out this information while getting your degree, you’re not doing your job as a student. It’s one thing to get through the coursework, but you’re also supposed to be learning how to do independent study and work well with others.

There’s nothing wrong with starting a LinkedIn and reaching out to a few alumni and just asking what their day-to-day looks like. Most are happy to respond. I’ve been contacted a few times by people asking about what I do for the same reasons.

User avatar
hsilman
✓ Registered User
Posts: 2842
Joined: Fri Sep 15, 2017 8:31 am
Age: 39

Re: Computer programming thread

#679

Post by hsilman » Tue May 17, 2022 6:54 pm

I have zero personal projects and zero internships. Just landed a job fully remote for 90k. Probably 200-300 applications, 5 interviews. 1 bombed completely, two made it through the process and then rejected, and then this last one it felt good from start to finish and got an offer. Asked for 15k more just by asking, and they offered 10 and I just signed.

I will say, until this experience, it felt like shit. Rejection after rejection. But it just takes one.

All this "studying intensely, do some huge side project app that gets 100k downloads on google play" is NOT BAD, but it's not normal. Most students don't have internships, and even fewer have actual useful projects.

Definitely study leetcode, but don't go crazy just treat it as part of your studies. I only "studied" maybe a dozen problems, got a couple of patterns down and that covered everything I saw in assessments.

Get your resume looked at. Mine has a single year of IT support desk work and 4 projects I did for class. Just gotta hit some key words and make sure it's formatted in a way the automated screener picks up.

JimRiley
Registered User
Posts: 1282
Joined: Sat Sep 23, 2017 11:51 am
Location: <x(t), y(t), z(t), t>
Age: 69

Re: Computer programming thread

#680

Post by JimRiley » Wed May 18, 2022 11:00 pm

Congratulations on the job, @hsilman! I hope it works out awesomely for you.

Just a general comment on internships. Especially for entry-level positions, when it comes down to engineering managers deciding who to interview, internships can make the difference between your resume landing in the big pile or the little pile. I participated in those decisions quite a few times at various companies, and when HR sent us a set of candidates who had passed their screening for a relatively junior position, strong internships were often the differentiator we relied on most in deciding who to actually interview. (For more senior people, of course, we naturally paid much more attention to "real" jobs instead.)

Fortunately, a lot of colleges do a lot to help their STEM students land internships. The community college where I taught even had a spring semester course for that very purpose - we'd coach them on preparation, the application process, project management, the whole nine yards. Most of those internships were paid, and most were within a reasonable commuting radius from our district. I'd be happy to get more specific via PM if anyone is interested.

Post Reply