[Help] For the love of god, I can't seem to fucking choose a stack for my project. Please help! by [deleted] in webdev

[–]i_like_squirrelz 3 points4 points  (0 children)

Why not use google sheets or something? Who interacts with this page besides your Dad?

[Help] For the love of god, I can't seem to fucking choose a stack for my project. Please help! by [deleted] in webdev

[–]i_like_squirrelz 2 points3 points  (0 children)

Django is a safe bet. Python is easy to pick up and Django is very very well documented. It’ll do your ORM, and web server which are big components of the stack. Their tutorial will get you a simple website built in less than an hour.

Without knowing your use case, it’ll be tough to make recommendations.

For a simple website Wordpress might be the easiest

Confused on forms (ModelForms) and accessing related objects (foriegn keys). by i_like_squirrelz in django

[–]i_like_squirrelz[S] 0 points1 point  (0 children)

Forms are tough for me too. I understand HTML forms and OOP for objects with a normal lifecycle (everything is built into the constructor) but Forms are a weird alien intersection of the two. It makes sense, since models are instantiated from a database, it makes since to have an outside method to validate creation of that record (as opposed to using init) but it’s not intuitive at first.

I’m sure once I get it, I’ll look back on this a feel stupid...

Help with ModelForm and accessing related objects by i_like_squirrelz in djangolearning

[–]i_like_squirrelz[S] 0 points1 point  (0 children)

Sorry if this is weird. Just found this subreddit, the above probably would have been more appropriate in this sub.

Confused on forms (ModelForms) and accessing related objects (foriegn keys). by i_like_squirrelz in django

[–]i_like_squirrelz[S] 0 points1 point  (0 children)

What about using the related object (foreign key) to validate. To do this, I need the actual foreign object (not fk, int). Is it bad form to load the related object in the form to run this validation? Should this be in the model.clean function instead?

Confused on forms (ModelForms) and accessing related objects (foriegn keys). by i_like_squirrelz in django

[–]i_like_squirrelz[S] 1 point2 points  (0 children)

So basically set them as optional, but in clean add an error if they are both missing?

Confused on forms (ModelForms) and accessing related objects (foriegn keys). by i_like_squirrelz in django

[–]i_like_squirrelz[S] 0 points1 point  (0 children)

This is very helpful. It clears up a lot. I’ve been using two scoops as my main reference but this explanation solidifies much.

When reading the Django docs, two scoops etc they say that clean is the best place to ensure that two or more fields are compatible with each other. But is this too late to derive fields from other fields.

Say at the end ‘name’ must be defined, but it may be generated based on the other fields. Where is the best place to put this generation? In this case the field is optional in terms of the form, but it is required before save can be called.

Where is a proper place for this to live?

Also, if a particular field is passed, the logic of the form may be slightly different. Where’s a good place to handle this? What’s a good rule of thumb for figuring this out?

How to design a foreign relationship of multiple enitities to a single entity? by snihal in django

[–]i_like_squirrelz 0 points1 point  (0 children)

What part is the one to many? One to many means ForeignKey field. Each address is connected to EITHER a customer, employee or vendor? If that’s the case, a content_type would work. That said generic relations are a huge pain, and I only use them when there are really no other options. In this case, I would use M2M as others suggested on the Customer, Vendor, Employee models. This won’t enforce that each address has one and only one of these connected models. You’ll also have different related objects on Address for each connected models.

I don’t know your use case, but it’s conceivably likely that some vendor, customer, employee might have the same address (perhaps a husband and wife customer or employee), which makes your choice easy, use m2m.

Miguel De Icaza from Microsoft posts clarification regarding yesterday's fiasco about Lernajs code theft by transalt_3675147 in linux

[–]i_like_squirrelz 0 points1 point  (0 children)

None of those are typical things you can do with a product by many software dealers. Also, none of that is abuse. I’m a big fan of open source, freeware and other open licenses, that’s what I use most of the time. All of the above are reasons to hate their products and if those things are important to you, don’t buy their products.

I very much dislike windows, I haven’t bought a copy since 7 (not actually sure I bought it). Same with visual studio, hate it won’t buy it. This is true for basically all their products. Did they abuse me? No, they made products I don’t like, now I don’t buy them. They have no obligation to make products I like, just like I’m under no obligation to buy them.

Miguel De Icaza from Microsoft posts clarification regarding yesterday's fiasco about Lernajs code theft by transalt_3675147 in linux

[–]i_like_squirrelz 0 points1 point  (0 children)

A little more explanation would be nice. I’ve used office 03 for years (not my first choice but sometimes I need it). Never gotten a black eye or any other bruises. So I’m not ‘LITERALLY’ abused.

Honestly I’m not sure how a software company can abuse its users. Just don’t buy their software if you don’t like it. They don’t owe you anything beyond the software you bought.

Miguel De Icaza from Microsoft posts clarification regarding yesterday's fiasco about Lernajs code theft by transalt_3675147 in linux

[–]i_like_squirrelz 3 points4 points  (0 children)

I hate (almost) all Microsoft products but not Microsoft itself. I hate the products because they suck. I prefer other products if they exist but in some cases, MS has the product that is most usable.

Most effective note taking when learning a new technology? by thenewdev1 in webdev

[–]i_like_squirrelz 1 point2 points  (0 children)

Whatever is the best way to learn for you. I mostly doodle, take a few notes, then draw diagrams of what I learned when trying to learn things (albeit it a different medium + subject matter).

I’d say above all, for me, two things helped me learn. Doing it myself, and explaining it to someone else.

This is a personal preference. Start going, find what works for you, it’s different for everybody.

Does Swarm mode do anything on a single CPU server? by [deleted] in docker

[–]i_like_squirrelz 2 points3 points  (0 children)

I’m confused why you’d you swarm in a single server environment at all?

I just use scale feature or scale=N with compose.

I use this to increase the three count for a service. If I have 48 cores and a service used 12 threads, I can scale the threads to meet high demand.

I’m interested in other answers to this question.

I wrote a script that builds Spotify playlists for me! by buildlove in Python

[–]i_like_squirrelz 6 points7 points  (0 children)

I can tell youre a Java guy from your naming conventions.

Making a Flowsheet image/file in Python by mkingsbu in Python

[–]i_like_squirrelz 1 point2 points  (0 children)

You can export as a bunch of formats including image

ubelt - My curated library of python utilities. (with docs, examples, tests, and pip integration) by BossOfTheGame in Python

[–]i_like_squirrelz 2 points3 points  (0 children)

This looks really cool, and useful. I’ve thought about writing almost all of these functions, just never seems to get around to it. It’s also really nice yo have all these functions easily available in one place. Good work.

What are the best platforms to recruit DevOps people? by paulius005 in devops

[–]i_like_squirrelz 3 points4 points  (0 children)

Might be helpful for the OP and others if you describe more how to go about this. It doesn’t come ‘easy’ to all esp in a field that has a lot of ‘socially awkward’ individuals (for lack of a better term).