I'm bored, ask me computer stuff

A repository for intrinsically valuable information

I'm bored, ask me computer stuff

Postby A Combustible Lemon » Fri Feb 23, 2018 3:24 pm

I've been considering starting a workshop on programming from the ground up (from the computer architecture level, something tutorial style things'll never teach you) here, and/or an ask an indian thread with Lads.

This one's for programming or technical questions about computers. I've got an electronics degree and a Software Engineering job so there's plenty of stuff I know that's useful.

You can ask diagnostic questions too, but unless I've got an immediate idea of what's wrong I'm probably gonna google it myself or tell you to.
  • 4



WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: I'm bored, ask me computer stuff

Postby sunglasses » Fri Feb 23, 2018 3:44 pm

OK but can you help me understand what hardware and specs I should be looking for when purchasing a desktop that won't age out in two years and is under 1500$?

Or what sites to go to, etc.
  • 2

TCS Etiquette Guide

Rules and FAQs

Zevran wrote:Magic can kill. Knives can kill. Even small children launched at great speeds can kill.
User avatar
sunglasses
TCS Moderator
TCS Moderator
 
Posts: 11541
Joined: Tue Apr 16, 2013 2:52 pm
Show rep
Title: The Speaker of Horrors.

Re: I'm bored, ask me computer stuff

Postby A Combustible Lemon » Fri Feb 23, 2018 3:59 pm

I'm behind a giant import wall, so my prices aren't gonna be much the same as yours. Americans in general get computers for way cheaper. The main things you gotta remember is that computers moved way way past the things any program that's not a videogame ask of them about ten years ago.

Some randomly useful pointers:
Processors and GPUs have a major number and a minor number, so a later generation i5 will be better than an earlier generation i5 but not necessarily better than an earlier generation i7. Or an Nvidia GTX 960 < a GTX 870 no matter what.
The 10 series (the GTX 1080 etc) is a giant exception though. It's a generational leap in power.

Unless what you use your computer for has a lot of stuff for simulation (yes, very Simmy games count too but the usual uses are stuff like Neural Nets and Control Systems), you can get away with a lower powered processor for cheaper.

Then there's plenty of resources for getting info on building PCs and Sales in subs like PCMasterRace and BuildAPC and BuildAPCSales.
  • 3



WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: I'm bored, ask me computer stuff

Postby ghijkmnop » Fri Feb 23, 2018 4:41 pm

Redacted
  • 3

Last edited by ghijkmnop on Thu Mar 14, 2019 3:57 pm, edited 1 time in total.
Delete my account
ghijkmnop
Time Waster
Time Waster
 
Posts: 1962
Joined: Thu May 28, 2015 8:22 am
Show rep
Title: Prisoner of TCS

Re: I'm bored, ask me computer stuff

Postby blehblah » Thu Mar 01, 2018 3:01 pm

sunglasses wrote:OK but can you help me understand what hardware and specs I should be looking for when purchasing a desktop that won't age out in two years and is under 1500$?

Or what sites to go to, etc.


What do you want to use it for, Sunny?

For under $1500, you can get a pretty solid tower. What you can't get is a high-end gaming platform.

It also depends on how handy you are when it comes to opening a case and swapping-out stuff. It is far easier than most folks figure; the guts are designed such that only the right things will connect with the other right things.

If you are looking for a surfer/emailer/light gaming system, you are okay with something like the following:

- Okay CPU (this is really where you want to focus spending)
- Onboard sound and network
- NOT onboard graphics; you want a slot so you can upgrade graphics a few years down the road
- Four slots for RAM; don't worry too much about the type; two slots if you're in a pinch
- A power unit with a tad more watts, and free connections, than you need on day-one (this can be tough to find in pre-built towers, but it's nice to have)

I scooped my current desktop as an open-box deal at BestBuy some years ago. At the time, it had a solid CPU (Intel i7-2600 at 3.4 GHz; pretty wow back then). Over the four or five years I've had this thing, I've:

- Brought the RAM up to 12 GB (very cheap for DDR3, these days)
- Upgraded the graphics card (Nothing special; GeForce GT 740 - again, cheap because it was outdated when I bought it)
- Swapped the platter disk for a solid-state drive

It does what I want. In the day-to-day, more RAM and going from a spinning platter to an SSD have extended the life of this system quite nicely. It boots quickly, runs the silly/shitty games I play, and generally is the cat's meow for what could be considered a vintage-ish box.

Back in the day, I'd build my own systems (not difficult, if you have the readies and time to research and shop for deals on kit). These days, I'm far less focused on having the latest and greatest, and time/effort also factor-in.

With all that in-mind, if you are after a solid box that will keep chugging without being all cutting-edge, hit a big box store and find someone who can answer basic questions (how many slots for RAM? Is the graphics onboard or not? Does the power unit have Watts and connectors to spare? How does the CPU compare?). Don't dwell on how much RAM it has day-one, or how large the hard drive is, because that stuff is dead-easy to upgrade (and those are the silly numbers they like to toss around).

If you want something which will last without needing to be cracked-open, the one thing I would advise is going for something with a solid-state drive (SSD) and plenty of RAM. You get a lot of bang for the buck out of an SSD versus a traditional hard drive (HDD). Even cheap CPUs and RAM will bottleneck a slow hard drive.
  • 1

A quantum state of signature may or may not be here... you just ruined it.
User avatar
blehblah
TCS Junkie
TCS Junkie
 
Posts: 3895
Joined: Sun Apr 14, 2013 9:16 pm
Show rep
Title: Error General, Panic Colonel

Re: I'm bored, ask me computer stuff

Postby cmsellers » Thu Mar 01, 2018 3:22 pm

I bought these magnets to decorate my computer with but they're not sticking. How do I get them to magnet properly?
  • 4

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

Re: I'm bored, ask me computer stuff

Postby A Combustible Lemon » Thu Mar 01, 2018 3:27 pm

Magnets won't automatically flip the bits on a harddrive through the shield, instead what you should be doing is sticking it over the write head and trying to write something big, preferably copy a large file. The write head's supposed to move very precise amounts to hit the correct locations, so any extra acceleration, like from a magnet or being upside down or being slightly off-tilt tends to make it start screaming and writing on the walls.
  • 4



WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: I'm bored, ask me computer stuff

Postby cmsellers » Thu Mar 01, 2018 3:30 pm

What if I have a solid state drive?
  • 1

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

Re: I'm bored, ask me computer stuff

Postby A Combustible Lemon » Thu Mar 01, 2018 3:40 pm

I'm not sure you can destroy a solid state drive through the power of magnetism. Unless it was really really big magnetism that can induce enough of a current to fry some of the control bits. Pretty unlikely.

Wait your question was about sticking them on the case wasn't it?

get a metal case.
  • 3



WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: I'm bored, ask me computer stuff

Postby Grimstone » Fri Mar 02, 2018 6:09 am

sunglasses wrote:OK but can you help me understand what hardware and specs I should be looking for when purchasing a desktop that won't age out in two years and is under 1500$?


Like blehblah said, it depends what you plan on using it for. I bought a desktop computer back in 2007 for $700 which still runs just fine and is perfectly usable for web browsing and what not(amd athlon with 4gb ram). If we're talking gaming I'd suggest focusing on the CPU and GPU and comparing them to current gen consoles. For example, if you want to build a gaming PC with specs comparable to that of a PS4 you're probably looking at spending $150~ on the cpu and about $350-400 right now on the gpu.
  • 2

"The struggle itself towards the heights is enough to fill a man's heart."
User avatar
Grimstone
TCS Guerilla
 
Posts: 2160
Joined: Wed Feb 17, 2016 11:52 am
Show rep
Title: Creature of the Night

Re: I'm bored, ask me computer stuff

Postby sunglasses » Fri Mar 02, 2018 3:40 pm

That's all pretty helpful.
  • 1

TCS Etiquette Guide

Rules and FAQs

Zevran wrote:Magic can kill. Knives can kill. Even small children launched at great speeds can kill.
User avatar
sunglasses
TCS Moderator
TCS Moderator
 
Posts: 11541
Joined: Tue Apr 16, 2013 2:52 pm
Show rep
Title: The Speaker of Horrors.

Re: I'm bored, ask me computer stuff

Postby Learned Nand » Fri Mar 02, 2018 8:11 pm

I've recently been working on a project with Mongoose and Express, and am finding that I like javascript a lot more than when I first tried it out years ago. Which front-end JS framework should I learn?
  • 1

Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

Click for a Limerick
OrangeEyebrows wrote:There once was a guy, Aviel,
whose arguments no one could quell.
He tested with Turing,
his circuits fried during,
and now we'll have peace for a spell.
User avatar
Learned Nand
Back-End Admin
Back-End Admin
 
Posts: 9858
Joined: Tue Apr 16, 2013 9:18 pm
Location: Permanently in the wrong
Show rep
Title: Auditor of Reality

Re: I'm bored, ask me computer stuff

Postby A Combustible Lemon » Fri Mar 02, 2018 9:02 pm

To start with, I'd recommend sticking with native just to see /how/ problems are generally solved, because knowing the actual algorithm behind the tooling you're using makes debugging it way way easier. Another reason for this is that javascript, as a low-entry-requirement language is very very faddy, and the latest frontend's gonna be something no one'd heard of before, they usually have a turnover of about 3 months before someone else "solves" frontend work.

Also as a side note, an absolute requirement for javascript work is the MDN docs. MDN is ridiculously good at documentation, to an extent I haven't really seen outside of en.cppreference.com . They're concise, explain common pitfalls, come with minimum viable code, have a history of availability in all the major browsers at the bottom, explain which features are standardised and which are just upjumped libraries that FF and Chrome but not Edge or Safari implement. A ton of good stuff that's useful.

But when you actually get to working with a frontend, my preference is for React with Redux, because it's one that's actually recognizable as javascript, and the JSX Harmony language is an absolute pleasure to work with and offers a really good, nearly first-class integration with the DOM. I recommend redux along with it because immutable's really the only way to handle data safely in javascript. It's absurdly hard to do it well without it because of stupid caveats like javascript's insane type coercion decisions or multiple null value types or prototype chain leaks or lack of datastructure ownership.

I'm not a big fan of angular because it's one of those frameworks that basically isn't any good if you don't use any of its tooling, and locks you in to a ton of stuff. Angular's not really an extension of the language like libraries ought to be, it's pretty much more of an app you can communicate with using a bunch of typescript config files. Typescript's big advantage is that it, as the name suggests, is a typed language extension for js. Type safety's a pretty good tradeoff for having to learn a new language and use google's libraries for everything.

These are the big full conversion type frameworks, but normally integrable frameworks are also pretty popular and I prefer them over react or angular. We're using Semantic UI in our electron app right now and it's decent. In my old company we used to use a shitton of bootstrap to do stuff too. Bootstrap's UI components are pretty decent to look at, and make rapid development way easier.

There's also the venerable swiss army knife, the Boost of javascript, which implements a ton of clever ideas that end up in the ES standard like CSS style selectors for DOM objects, JQuery. If you're ever working with someone else's code, there's a pretty giant chance you're gonna be looking at some core functionality js didn't provide being done with JQuery so even if it's losing steam recently because of the bigger frameworks that do more for you, it's a pretty good thing to know. Most web devs pretty much don't know how to do things that made it into the standard post-jquery and just stick to the jquery way of doing them.

Another must-have library because it fills in a giant hole in javascript's design is Moment.js. Dates in javascript are garbage. There's no other word for them. They coerce into strings if you don't construct them with a new, unlike any other object javascript offers like strings or arrays or maps. They have wildly inconsistent formatting across browsers, you can add them and they'll concatenate as a string, while if you subtract them they turn into an unusable difference of unix timestamps. There isn't a standard formatter function like strftime, and the native way to do it is to extract all the elements one by one yourself, left pad them one by one yourself (usually with a function you write since leftpadding wasn't in the standard until last year), and concatenate them yourself. Use moment, it'll save you the headache.

Code: Select all
>new Date() + new Date()
"Sat Mar 03 2018 01:26:04 GMT+0530 (India Standard Time)Sat Mar 03 2018 01:26:04 GMT+0530 (India Standard Time)"
>new Date() - new Date()
0
>Date() + new Date()
"Sat Mar 03 2018 01:28:02 GMT+0530 (India Standard Time)Sat Mar 03 2018 01:28:02 GMT+0530 (India Standard Time)"
>Date() - new Date()
NaN
  • 3



WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: I'm bored, ask me computer stuff

Postby Windy » Sat Jun 09, 2018 12:36 am

What's a regex that can be applied to a string to prevent any possible XSS attack?
  • 1

User avatar
Windy
TCS Junkie
TCS Junkie
 
Posts: 3127
Joined: Fri May 29, 2015 11:41 am
Show rep

Re: I'm bored, ask me computer stuff

Postby NathanLoiselle » Sat Jun 09, 2018 1:11 am

If I wear a dead computer's skin can I claim that I am, in fact, an AI?
  • 0

User avatar
NathanLoiselle
TCS Junkie
TCS Junkie
 
Posts: 4484
Joined: Wed Jul 09, 2014 3:49 am
Location: You'll Never Know!
Show rep

Next

Who is online

Users browsing this forum: No registered users and 1 guest

cron