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?
Kind of a different question, but my internship for the upcoming summer was rescinded because of COVID-19. I'm now doing an unpaid internship for a startup here in Denver but I'm really just cheap labor as I'm the only "software engineer."
I place that in quotations because it's a company running shopify for their product so I'm really just installing plugins before they launch next week.
I am searching up and down for an actual internship, I'd even take an unpaid one doing actual programming at this point, but can't find anything.
Is it better for me to just stick this one out and keep installing plugins for them at no pay or should I say no to it and just work a side project instead? I'm being told two different things from Reddit (shocking) and not sure if having that internship is do or die for my job hunt following the upcomming semester.
The answer is going to come down to who you apply to and what their preferences are. To me, as someone who has input to the hiring process at my company, I'd prefer to see in order of importance:
Whatever you decide, just be sure to tailor your resume to the company you're applying to if you want to increase your chances.
At one point do you feel the need for the
const.py
file? Maybe PyCharm can help you with that. You might write outconst.my_new_const
and let PyCharm create it via a shortcut.Is it possible to import a python file that is present in a parent directory?
You’ll have to add the directory containing the file to your python path, either permanently in your .bashrc or at runtime in your imports.
Yeah. I thought this must be a frequent enough task for python to support using '../' for module imports.
I've been struggling with this a lot recently too. I think my fault is that I run all my python scripts as individual files. That means, I'm not really using the module concept of my parent directory. I've been thinking about creating a main.py file in the root directory that transforms all my little scripts into commands for an internal CLI. This doesn't help my desire to reuse code in jupyter notebooks. We'll see if I ever get around to it though.