« first day (2640 days earlier)      last day (18 days later) » 

9:27 AM
good morning
 
 
6 hours later…
3:26 PM
@MahmudulHaqueKhan howdy!
 
 
5 hours later…
8:08 PM
Hey, I could really use some help designing a database for a product list. I feel like I get the idea/principle used to structure the data, but once I start to get my hands dirty, I quickly recede back into a state of confusion.
 
@wellington what questions about the product list will your code/the client need to answer?
 
Well, its for a website...its a list of cabinet designs.
 
@wellington What all does the client need to tell their customers about cabinets?
Do you have access to the visual designs? A lot of times, those will make it clearer what needs to be stored than asking the client directly
 
I have a table that includes the item name (id), style, material, panel (recessed or raised)
 
@wellington If that's all that is needed to power the site, that sounds pretty good to me on the face of it
 
8:12 PM
I'm just not sure how to set it up to have multiple tables.
 
What do you need multiple tables for?
 
Yes, I have all the information and images of each cabinet
 
afk, back in a bit
 
I was using the student/teacher example since I want the user to populate the list by clicking buttons on another webpage (2 web pages in my case: By Style and By Material). Each web page briefly defines each style or material, so the user can choose to see the cabinet designs available based on their preference.
student/teacher example used to explain the many-to-many relationship concept
I'm using Wix -- bittersweet as it has its own learning curve and limitations
 
9:00 PM
@wellington it may be worthwhile to have a separate table to list cabinet styles, and another one to list materials
So that you can easily select all the current styles/materials
And add new styles/materials if necessary
 
That's what I was hoping to accomplish...that it would be easier to manage down the road
 
@wellington yeah, unless you know for sure that there will only ever be 2 materials or something, that's probably what you want
 
I'll explain my approach: 3 tables (ProductList, Material, Style), ProductList only contains the pk, ProductID, the Product Name and image
 
@wellington Can products have more than one material or more than one style?
 
Material contains MaterialID, ProductID, Material Type, Material Description/info
They can have more than one material, but not style.
Should I trash the Style table?
Sorry for being a bit dense, this is unchartered territory for me.
 
9:10 PM
No worries
What columns are in the Style table?
So your Product table will have a StyleID column, because it links to a single Style
But you'll need a fourth table to link together multiple products to multiple materials (what's called a "many-to-many relationship")
 
StyleID, Style Type, Style Description
 
Would you ever want to display styles and materials in the same list? Like, as if they were different types of the same thing?
If so, then you might want to combine them into the same table
If the answer is no, that would never make sense, then leaving them as separate tables is fine
 
Okay, not accounting for a fourth table is where I was getting confused. How do I go about linking it all together in the fourth table?
I haven't really considered displaying style and materials in the same list...do you think that's worthwhile?
 
you'll want to call it ProductMaterial or something - you'll probably want to give it an autoincrement id as the primary key, though you probably won't ever use it directly. Then you'll give it two columns: ProductId and MaterialId, and you'll put a unique index on the table that covers both those two columns
@wellington If you ever find yourself asking "how do I easily select from both Style and Material at once?" then they should probably be in the same table. But if they are really logically distinct, then I would advise against trying to combine them for now.
 
Sounds good. I think I'll leave it alone then. What do you mean by a unique index to cover the two columns?
 
9:19 PM
How much do you know about indexes/keys?
 
lol
I've scanned over some of the documentation
 
tl;dr about indexes: you should generally only ever reference columns in your WHERE/ON clauses that have indexes on them
A unique index means that for whatever columns are in the index, the database will guarantee that there is only ever one row in the table that has that combination of values
So a unique index on StyleId,ProductId means that ProductId 4 can only ever link to StyleId 2 in one row
 
Ah. That makes sense.
 
And if you try to insert 4,2 a second time, that second insert will fail with an error
 
I understand a little better now. I'm sure that will change once I get started.
 
9:23 PM
Tangentially, I'd recommend reading this for some good conventions to follow joshduff.com/2016-07-writing-sql.md
It will save you pain in the long run
 
Is this your site?
How the heck did you get into databases!? Holy crap it's caused me to turn a molehill into a mountain! Everything is more complicated then it seems at first glance
I really appreciate the clarification and help
 
@wellington You're welcome :-)
My first job was working on inventory and point of sale software. Very database-heavy
Thankfully, I worked with coworkers who cared a lot about schema and making complicated software maintainable by simplifying as much as possible when it came to the database
 
Do you have a degree in IT?
Absolutely zilch beats quality hands-on experience.
 
Nope, I dropped out to work full time at that software job after 2 years at a university
I was working part time there during my second year at university, and was learning more in a week than I learned in a whole semester :-|
 
I see jobs all the time for SQL/database experience--does it pay well?
 
9:33 PM
There's a lot of money in business software
And there's a lot of competition to hire developers now
 
lol, I believe it. Sad we all spend so much money for a piece of paper and walk away non the wiser
 
So yeah, it seems like one of the better fields to be looking for salaried work right now
And not just the money, but the time! You start 4-5 years behind everyone else
 
I did IT work in the Navy for a couple years, but found it kinda boring. Regretting that now.
 
4-5 years experience is worth more than the cost of university
Not to mention the fact that you make money instead of losing it while you're getting that experience
 
How did you land your first job?
 
9:36 PM
A fraternity brother of mine was a developer at the company (very small, less than 10 people total at the time) and they needed someone to do phone support, and I needed a job
So I started doing phone support, and bugged the two developers to install Visual Studio on my machine so I could fix bugs between calls
I actually wrote up a description of my time there as a digression on my resume resume.joshduff.com/isoft.html
 
Unfortunately after the Navy, I went back to school (thinking I was doing the responsible thing) to pursue an engineering degree. Finished 2.5 years and took a semester of to tend to other things, turned into almost 2 years. Most places I look now want you to have experience.
That's awesome man. Sounds like you made the right choice.
 
I've been very fortunate
Well, if you ship a site like this for a business, that will look like good experience to a lot of places
On the topic of careers in software, if you haven't seen these yet, they are must-reads: kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer + kalzumeus.com/2012/01/23/salary-negotiation
 
Maybe, but I imagine it takes a bit more than that...
 
@wellington Not really! If you can write code that makes someone money, you're valuable
Obviously there's a long learning curve to do that really well, but "can make someone else money" is all it takes to be an asset
 
Thanks for the websites. Will definitely read.
 
9:44 PM
Relevant to current job market and what it takes to get hired medium.com/@steve.yegge/get-that-job-at-grab-eea6de1d8421
 
I am sure you're right, but it's a jungle out there! I have a good grasp of basic Java so a while back I started getting into the more advanced stuff and I quickly get lost.
How do you get to the point of "making someone else money" in your programming skills?
 
Protip: set up a custom search in your browser of choice that searches the official docs of whatever tools you use
So that you can, for example type "j linkedlist" and hit enter and it will run a Google search on the Java docs
 
It seems like you need to know everything--I can't even get job interviews. Where I live is extremely competitive
 
Where do you live?
 
Washington DC-metro
 
9:48 PM
If this cabinet site makes money for your client, then you're there
 
Noted: Add custom search
 
Related to getting job interviews and playing the resume game: daedtech.com/… + daedtech.com/become-software-specialist-help-resume
It seems like most of the difficulty is getting that first job
 
Do you focus on one programming language/concept before moving on to other stuff.
 
I tend to stick to using one technology/stack for as long as it's good for the projects I'm working on
I read about other technologies/stacks so that I have an idea of what other good options are out there
 
Definitely. Stranded without a paddle until you can get that experience
 
9:51 PM
But I don't feel compelled to go learn new technologies deeply unless someone is paying me to learn them to work on something long-term
 
Where do you live?
 
Nebraska
I've been working remote for the last ~5 years
My last two W2 employers were headquartered in New York and California
 
Rub it in. That's what my old IT buddies keep telling me.
 
There are less jobs advertising for remote, but there are still a good number
 
That's exactly why I want to get back into that job sector -- endless opportunities.
 
9:54 PM
Bear in mind that IT != software development
 
haha
 
IT is usually a code word for lower-paying technology-related jobs
 
Yes, that's kinda why I got out of IT...
I've considered going back to school (online) to finish a degree in Computer Science...will set me back a semester or two by leaving engineering
Just hard to compete without an undergraduate. Are most of your work backend development?
 
@wellington I've been working on both front-end and back-end in every job I've had, mostly because I've been working at smaller places with less than 10 developers
Pretty much all of my open source code is JavaScript, even though a good number of it is back-end
 
I've bounced back and forth learning HTML5 the past year or two. So many different frameworks and new tech being added all the time--that stuff gets confusing and hard to keep up with. That's usually why I give up on that pursuit. ha
I understood not a single thing on ur github
 
10:10 PM
@wellington I would recommend ignoring the big popular frameworks until someone pays you to use one
They're usually not great choices anyway, and remain popular because they are already popular and so people think they're good options
 
hi
 
@KTWorks greetings
@wellington when it comes to HTML5 and other browser tech, search for "mdn [your search term]" to find the best documentation
MDN is the best source of browser/JS/HTML/CSS documentation
 
i have an apache server on a rasperry pi with dyndns. I was an old project and it worked but it does not work. Somebody have an idea what could be wrong?
It
 
@KTWorks haha, I know this channel is a bit off-topic already, but does this have anything to do with databases?
 
now it does not work
 
10:13 PM
@KTWorks In any case, you'll have a difficult time getting useful answers with that question
 
ok :D
 
[Tue May 29 06:25:05.718192 2018] [mpm_prefork:notice] [pid 1030] AH00163: Apache/2.4.10 (Raspbian) configured -- resuming normal operations
[Tue May 29 06:25:05.718288 2018] [core:notice] [pid 1030] AH00094: Command line: '/usr/sbin/apache2'
 
haha
 
This was the error.log from apache
 
10:15 PM
Ah yes, good ol firefox. Thanks for the articles and tips!
 
👍
Do you have a Discord account?
 
Might find better luck asking someone on the Raspberry Pi forum
No, what is that?
 
Chat app/service discordapp.com
Like Slack, but better
 
10:28 PM
Is this what you use for work?
 
No, but it is what I use for most community chat rooms
 
"don't call yourself a programmer" is a really good article
 
Aye Patrick McKenzie writes good practical stuff
 
10:52 PM
@TehShrike Dude, I'm so glad we crossed paths and you shared those articles with me. Gold.
 
:-D
 

« first day (2640 days earlier)      last day (18 days later) »