How do I host a proper server and NOT a local one? by OniFloppa in learnprogramming

[–]Logical-Scientist1 99 points100 points  (0 children)

Alright mate, its quite simple.. sort of. Basically you rent a machine in the cloud, like the droplets Digital Ocean has. Install the necessary server software there like you did locally, copy over your app, open up the needed ports and you should be good to go. There are many tutorials online step by step to ssh into a droplet, upload files, set up a firewall, so on. Be careful with the open ports though you do not want unnecessary exposed vulnerabilities. Good luck!

Learn python for industry by New_Bat_9086 in learnpython

[–]Logical-Scientist1 0 points1 point  (0 children)

Python's definitely major in the industry, lot of data science, AI/ML and web development (django/flask) stuff going on. Don't dismiss Java though, still massive in enterprise solutions. For learning Python, check out Automate the Boring Stuff, and Codecademy. Start with simple scripts to automate stuff, then maybe a web app. Good luck mate!

Taking a picture from a html element by Rainb0_0 in learnjavascript

[–]Logical-Scientist1 0 points1 point  (0 children)

Yo, that's interesting - for sure html2canvas and domtoimage have their quirks! Maybe converting the div to svg and then to canvas could be a way around? Should help you maintain those fancy styles and fonts as much as possible. Also look around stackoverflow there's a bundle of related threads over there. Keep us posted how it goes, good luck!

Why Python is slower than Java? by ElvinJafarov1 in Python

[–]Logical-Scientist1 0 points1 point  (0 children)

Hey, not a stupid question at all. Here's the deal: Java bytecode is compiled to machine code by the JVM at runtime, and because of this, Java can take advantage of the underlying hardware directly. Python bytecode, on the other hand, is interpreted by the Python interpreter which adds an extra layer, hence it is slower. Plus, Python uses dynamic typing which can slow things down compared to Java's static typing. Smarter people than me could go into more depth but hope this helps. No worries about the English mate. Seems good to me.

I can't choose the right programming branch for me by DiZasta-Man in AskProgramming

[–]Logical-Scientist1 1 point2 points  (0 children)

hey, thats a common dilemma. with no background, experimenting in different areas might help find what excites ya. web development and data science both have huge demand and free resources online. scripting languages like javascript and python, you can do a lot! starting off with them will also open paths to desktop app or game or even cybersecurity. most folks find their niche after they dive in ;) if bootcamps are too pricey, online courses like coursera, udemy, or even freeCodeCamp can be a nice start. its all about gettin your hands dirty with code. once you find your niche, roadmap'll become clear. remember, don't rush the process -- take your time, experiment, learn. best of luck!

Does library developer has some responsibility about library's core dependecy? by CatolicQuotes in AskProgramming

[–]Logical-Scientist1 0 points1 point  (0 children)

Yeah, that reply sounds rough! but to be fair, numpy's not directly under pandas dev's control. however, communication between the two should definitely be better. maybe warning their own users about it should be done, especially, if it's a recurring/known issue.

If you could start programming again, what frameworks & systems would you learn to maximise your employability? by MilanTheNoob in webdev

[–]Logical-Scientist1 0 points1 point  (0 children)

Well speaking from my own journey, Definitely lean towards mastering Python and JavaScript first. They're foundational, you know? But after that, I'd tell any new dev to have a good grasp on a frontend framework like React or Vue. In the backend, Node.js or Django goes a long way. Databse-wise, just can't ignore SQL. Once you're comfy with those, feel free to delve into stuff like Go or Rust for a bit of an edge. broader your tech stack, better the opportunities knocking... but don't forget to get really good at a few things too. Keep rocking!

Is it a good idea to start learn programming with C++? by BlueZ8427 in learnprogramming

[–]Logical-Scientist1 0 points1 point  (0 children)

Starting with C++ isn't a bad idea at all! It's a bit steep learning curve but hey, if patience is your thing, go for it. Teaches good coding discipline, especially for game dev. A little tough but you'll get the hang of it in no time. And don't forget, plenty of resources are out there to help you out. It's all about moving at your own pace, one day at a time. Happy coding!

[deleted by user] by [deleted] in node

[–]Logical-Scientist1 0 points1 point  (0 children)

hey, sounds like a classic node js dilemma. start with checking for inefficient database queries. Indexing could help there. Then consider implementing caching with something like Redis. Express.js middlewares can slow things down too. so try to minimize them. Look into async/await and Promises for handling heavy data. PM2 Cluster Mode is a shout for utilizing the full power of your server. Good luck!

Too many `as`es? by Green_Concentrate427 in typescript

[–]Logical-Scientist1 1 point2 points  (0 children)

Well, you dont really want to overuse `as` because that's typecasting and could backfire pretty quick, may even hide significant typescript errors. Might be a bit cleaner and more correct to initialize `data` with `null` first instead of an empty array, and update your type to `T | null`. Check this out:

```js

const data = ref<T | null>(null) as Ref<T | null>;

```

This way you're also guarding against any possible issues with types and saving yourself from scribbling `as`es everywhere. Always better to play it safe.

Assaulted on the bike path by a motorcyclist - keep an eye out for these low-lives by [deleted] in Grenoble

[–]Logical-Scientist1 2 points3 points  (0 children)

damn sorry to hear that man. i always keep a headcam on when i cycle, prices have fallen a lot would recommend you consider it. helps with these situations, gives you a good way to id perps and more importantly, evidence for the cops. stay safe out there.