9
votes
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema:
```sql
CREATE TABLE article_to_warehouse (
article_id INTEGER
, warehouse_id INTEGER
)
;
```
How do I add a `UNIQUE` constraint?
This isn't so much of a programming question, but a career question that involves programming. Things have been a bit slow on these threads so I'll put it here anyway.
I recently graduated from college with a degree in an engineering field. Due to personal reasons, I'm in a bit of a job limbo, and will continue to be for a few months. I would like to use some of this time to build up a portfolio of work to try to convince people to hire me for a programming job in my field instead of someone with a CS or CompE degree. I'm not sure what to put in this kind of portfolio. I have written a good bit of code but most of it has been MATLAB scripts and the like for courses and I'm not really sure how impressive that is. I do have some ideas for what to put in a portfolio, such as:
I really enjoyed working on about half of this years Advent of Code before life caught up to me. I could finish that off and then go back and do all of the previous years as well. I like this because it gives me a steady framework, but I'm not sure if it would really impress anyone. I might do this for myself even if it's no good for a portfolio because I like puzzles :)
I have a bunch of random ideas for things I think would be cool:
I do have a website, but if has more of a sustainability focus. I might do some programming projects though, like taking worksheets from old solar power books and making them into command line or GUI programs.
There are some ideas I have thought about but am kind of intimidated by right now:
Anyway this has turned into a bit of a rant so if you happen to read some or all of it and/or provide any advice on the subject, thank you!
Not sure if that's what you need, but James Hague of the Programming In The 21st Century fame argues that CS should only be offered as a minor. His point, on which he elaborates in other posts, is that doing programming for programming's sake and being in love with a technology won't get you anywhere, and instead you should always think of the task you're solving with the technology.
So, a piece of advice that you may consider is finding a possibly non-technical domain that interests you and in which you could see yourself working, and then trying to solve a programming problem in it. E.g. creating something like an IMDB clone if you like films or a music player/equaliser/synth if you like music.
Hmm probably my biggest non STEM interest is history, and I think I could make some of the more gamey ideas I've had fit in with that as teaching tools.
I do think the advice to not major in CS is an interesting one. That said, my goal is to eventually apply CS to the technical field I have my degree in, so I'm not so sure the non-technical domain bit fits 100%, though I'm interested to try it out. Thanks for the perspective.
I think I will probably start with that, since it's a project I've been meaning to do and have dabbled in a bit already. Thanks for the advice!
When I'm interviewing a software candidate (especially one who is new or from an unconventional background) I'm mostly interested in seeing if they're smart, competent, and easy to work with.
For smart and competent, you'll need to show that you've done real work on a software project, and thought about the decisions and trade-offs you had to make in the process. Any of the projects you listed seem reasonable for this; it's more about how you build it and how you talk about it than about the actual app. Personally, I'd do Advent of Code (because it's fun and covers a lot of ground) and really devote myself to good practices. Taking 2019 for example, I'd write a solid 'intcode' library with unit tests and a clean API, and then reference it from all relevant problems. That's a solid medium-sized chunk of software engineering, and plenty of fodder for an hour-long technical interview.
For easy to work with, you'll just have to demonstrate that you can cooperate and take criticism and explain ideas; there's lots that goes into it, but it will transfer well from whatever else you've been doing, unless you're a jerk.
I'd caution you against doing cheapo freelance projects. First, you'll spend a lot of time doing client management, and unless you want to go into freelancing long-term that may not be a great use of your time. Second, you'll likely sign away rights to the code you've written, so when you start interviewing for other jobs you'll be have to talk about the project without showing any code.
If you want to dive in to open source contributions, start by looking through a project's github issues; there's probably some low-hanging fruit in there that you could fix and get merged. A well-written bug report should also help you avoid the "how can I parse through thousands of lines to understand what's going on" paralysis that you correctly anticipate.
glhf
Thanks for the advice! Advent of Code is definitely something I'm planning to keep working on. I was pleased with how my intcode stuff was turning out, though I only cleaned it up after I had to manage the amplifier challenge. Looking at issues completely slipped my mind when thinking about this, that's a great thing to consider too.
Is there a book for unit/integration testing best practices? I've been searching around and all I can find are books that focus on specific languages and frameworks.