6 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?

7 comments

  1. [7]
    acdw
    Link
    How do yall figure out what projects to work on? I want to learn more but I need a good project.

    How do yall figure out what projects to work on? I want to learn more but I need a good project.

    4 votes
    1. [2]
      Liru
      Link Parent
      I've found that this seems to only apply to me, from talking to some other programmers I know. Most of my recent projects fall into these buckets. Solving a personal problem that exists due to...

      I've found that this seems to only apply to me, from talking to some other programmers I know. Most of my recent projects fall into these buckets.

      • Solving a personal problem that exists due to having a crappy computer and internet connection at home, but improved stuff elsewhere.
      • Friends that don't know how to program have a problem that's relatively simple and solvable with a webpage or a program, and that I can iterate on.
      • Wanting to play with a programming language's features. (I've been on a pattern-matching bender recently)
      • Wanting to play with a specific library or concept. (Currently toying with Orleans since the virtual actor model caught my eye)
      • Randomly thinking "hey, I should implement this bit of functionality from a game and see where it takes me".
      • Randomly wondering if I can implement one part of something that has a client-server architecture.
      • Spite. "This program sucks, I could probably write something better."
      • Prototyping and being able to "show off" something that can be done quickly when other internal restrictions are in place (mostly work-related). Ties in a bit to the above point, since for me, it's mostly a "look what we would be able to do if we had a program architecture that wasn't classified as a dumpster fire" sort of thing.

      A good chunk of these aren't to "learn more" for me, though; I should probably fix that.

      4 votes
      1. acdw
        Link Parent
        These are all really great ideas, thanks! You're absolutely right, too -- the few projects I've really enjoyed working on fit the items of this list, haha.

        These are all really great ideas, thanks! You're absolutely right, too -- the few projects I've really enjoyed working on fit the items of this list, haha.

        2 votes
    2. [2]
      joplin
      Link Parent
      Basically, when I see something that's interesting and that I have a reasonable chance of being able to implement, I give it a try. A few days ago someone posted a link to a site that showed...

      Basically, when I see something that's interesting and that I have a reasonable chance of being able to implement, I give it a try. A few days ago someone posted a link to a site that showed different map projections. I've done a little bit of work in that area but have been wanting to explore it a little more, so I decided to just go ahead and implement a few of the projections I've never worked with before. Whatever I write won't ever be used by anyone but me, but it might give me some knowledge that I end up using in a real project at work or for fun later. (Or not. Sometimes the journey is its own reward.)

      3 votes
      1. acdw
        Link Parent
        This is such a great point; I should just write stuff when I feel like it! Thanks :)

        Sometimes the journey is its own reward.

        This is such a great point; I should just write stuff when I feel like it! Thanks :)

        3 votes
    3. [2]
      Moonchild
      Link Parent
      What do you want to learn about?

      What do you want to learn about?

      3 votes
      1. acdw
        Link Parent
        Lisp right now -- I keep meaning to set up Racket, but .. as far as what /about/, I'm not sure, lol. Programmy stuff? This might be part of the problem.

        Lisp right now -- I keep meaning to set up Racket, but .. as far as what /about/, I'm not sure, lol. Programmy stuff? This might be part of the problem.

        2 votes