[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
How do I think like a computer?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 54
Thread images: 6
File: comfy.jpg (174 KB, 497x544) Image search: [Google]
comfy.jpg
174 KB, 497x544
How do I think like a computer?
>>
>>47528735
dream in code

sidenote, that image looks terrifying
>>
Get a list of instructions and execute them one after another, in order. That pretty much sums it up. Oh, and do not think.
>>
damn that looks dangerous
>>
>>47528794
i could never get comfortable like that
>>
>>47528767
> not dreaming of electric sheep
>>
>>47528767
You say terrifying, I say comfy
>>
Take everything literally
>>
>>47528735
>praying starcraft against my rivar
>he of course picks protoss
>couriers everywhere
>absorute hoard of barbaric couriers destroying my defences
>i am very upset??!
*bumps into table*
>>
>>47528735
good thing we have tablets now, this guy can finally rest in peace.
>>
Computers do not think, they just obey. Join the army.
>>
>>47528885
He probably already is resting in peace. A CRT falling on your face is certain death due to their immense weight. And if the weight doesn't smash your skull they are literally so full of electricity that they kill you with it.
>>
>accidentally nudge table
>screen falls on your head
>shatters, implodes and discharges capacitant current into your face
At least you won't survive it.
>>
>>47528902
>>47528898
have you guys ever even used a CRT before? there isn't some sort of electric bubble around it or anything and if you actually think a CRT screen that small and thick will bust on a skull let alone concrete you are fucking retarded.
>>
File: 4.jpg (118 KB, 1280x960) Image search: [Google]
4.jpg
118 KB, 1280x960
>>47528950
>have you guys ever even used a CRT before?
Yeah what the fuck do you think I am, a moran? Of course I have used CRTs and they are heavy as shit. I have one right next to me at this very moment. If it fell on me it would CRUSH my fucking SKULL.
>>
>>47528735
Lobotomize large portions of your brain, including your amygdala. Practice rote memory like a Korean 24/7 too.
>>
01001111 01010000 00100000 01101001 01110011 00100000 01100001 00100000 01100110 01100001 01100111 01100111 01101111 01110100
>>
>>47528978
that wasn't my point though. it WOULD crush your skull. it WOULDN'T zap you with some mystical source of electric current.
>>
>>47529026
A CRT screen is a giant capacitor.
It is literally a mystical source of electrical current.
>>
>>47529026
>it WOULDN'T zap you with some mystical source of electric current.
If the crush didn't kill you it would. A CRT is known to kill even after being unplugged for a long fucking time. Them capacitors hold lots of juice
>>
>>47528735
Stop thinking and start taking orders.

[spoiler]Meaning go become a burgerflipper[/spoiler]
>>
>>47528845
Until I bump into the table and a 40 lb glass CRT crashes into your face.
>>
Why did it take so long for LCD monitors to become prevalent?
They had been used on laptops for decades.
>>
>>47529354
Cost.
Quality.
The fact that people didn't replace their computers every other day.
>>
>>47528735
Mindlessly do what others tell you to do.
>>
>>47529354
Why do you guys use LCDs? CRTs outperform LCDs in every comparison, For example:

CRTs Can do unlimited resolutions, while LCDs Have extremely limited(sometimes even going as low as 800 x 600 as it's max!)

CRTs have response times the speed of light, which means no ghosting, or getting used to it while trying to play games!

CRTs have true color and good contrast ratios. While LCDs have extremely limited color and poor contrast ratios, if you look at the black on an LCD and then on a CRT, there is no comparison, CRT wins.

CRTs are more durable, if you drop one, The monitor lives on. Whilst if you drop an LCD, it's completely ruined.

CRTs don't have input lag.

CRTs do correct upscaling

CRTs don't get deadpixels and unfixable driver IC issues. whereas most LCDs you buy within the first year will have a dead pixel, if not already having one out of the box.

CRTs come in widescreen: http://www.google.com/#hl=en&source=hp&q=widescreen+crt&aq=f&aqi=g10&aql=&oq
=&gs_rfai=CdsWImWx3TJy0GJXggwTji5TPDwAAAKoEBU_QDx_y&fp=9c2c65350d4186d5

True that CRTs consume more power, but it's well worth the extra ~$0.50 a month to use them.

The only reason CRTs are no longer sold by companies is because it is no longer profitable to sell them, due to the uninformed public only buying LCDs thinking they're better in every way.

CRTs have better text(xp, vista, and 7 come with a feature to make text more legible on LCDs)

sure, LCDs get the job done, but why would you want to use them? They're the PC of the monitor world, Shitty build quality, Fragile, and Don't do the job as well as their counterparts.

why do you guys pay so much for an LCD? it makes so much more sense to want a CRT.
>>
can anyone tell me why this code wouldnt work if you replaced "x+1" with 1? This code is simple it just tells you what number is repeated

var array = [1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 10];

for(var x = 0; x < array.length; x++){
for(var i = x+1; i < array.length; i++){
if (array[x] == array[i]){
alert(array[x]);
}
}
}
>>
>>47528735
Someone post the version where his head is crushed.
>>
>>47529384
find me new CRTs and I might buy one
>>
>>47529398
The code would still work, it just would not do the same thing.

You can easily see where the difference is if you just run through the code in your head.
>>
>>47529442

i dont see the difference because 1 would still be 1 ahead of 0 wouldn't it?
>>
>>47528735
Umm... Be dead, computers don't think.
That aside if you want to think more like a computer never have side thoughts and always follow a thread until its natural breakpoint.
>>
>>47529510
Delete your post, read the sticky and repost that using the code tags it tells you about.

Then I might consider helping you.
>>
>How do I think like a computer?
http://en.wikipedia.org/wiki/Deterministic_finite_automaton
It's really not that hard, after doing it for a few years.
>>
>>47529539

serious question if you can't understand any of that does that me somewhat retarded or do i have a learning deficiency ?
>>
File: snapshot30.png (146 KB, 1920x1080) Image search: [Google]
snapshot30.png
146 KB, 1920x1080
>>47529510
dude dat code
Save this for when you learn more later on, because you'll be sad at how complicated you made this.

>>47529539
Hey dude rate my DFA code from college. tfw minimizing size of a DFA graph and removing duplicate states and shit
>>
>>47529510
put the computerhand = blabla inside the while loop. it is only being executed once, thus always the same hand
>>
>>47529562
>if you can't understand any of that does that me somewhat retarded or do i have a learning deficiency ?
Yes.

The starting state is also the acceptance state.

As an example, "0001001" will be accepted.

It is literally simpler than a flowchart.
>>
>>47529398
the problem would arise in the 2nd iteration of the outer loop:
1 iteration:
1 = 2
1 = 3
....
1 = 10 ( no alerts)

2nd iteration
2 = 2 (incorrect check)
it should be
2 = 3, where 3 is the 2nd element
>>
File: snapshot31.png (90 KB, 1920x1080) Image search: [Google]
snapshot31.png
90 KB, 1920x1080
>>47529503
If you leave it as x + 1 you'll never print anything because in your original array no number comes twice in succession. You're comparing each number to the one that comes after it in the array.

If you just start at index 1, you're incrementing x and i together and they'll be equal every time.

Your comparisons using x+1
array[0] and array[1]
array[0] and array[2]
array[0] and array[3]
...
array[5] and array[6]
array[5] and array[7]

You'll never ``catch up''

If you use 1 in place of x+1, your first comparisons will be:
array[x] and array[i]
array[0] and array[1]
array[0] and array[2]
array[0] and array[3]
Which won't ever match. Once you get back to the first loop, though...
array[1] and array[1] //MATCHES, call alert()
array[1] and array[2]
array[1] and array[3]
...
Then on everything past the first run of the first loop you'll have one that matches
array[2] and array[1]
array[2] and array[2] //MATCH AGAIN
array[2] and array[3]


I don't understand how to write this out simpler. Try implementing your code and using print statements
>>
>>47529724
Here, I gieb you a quick java file.

Forgive any ugliness or whatever, I haven't written any java in several years. I had to Google how to make and array lol.

public class kek{
public static void main(String[] args)
{
int[] array = new int[]{1,2,3,4,5,6,7,8,9,10};

for(int x = 0; x < array.length; x++){
for(int i = 1; i < array.length; i++){
System.out.printf("comparing %s and %s\n", x, i);
if (array[x] == array[i]){
System.out.printf("MATCH at %s and %s\n",x, i);
}
}
}
}
}
>>
>>47529736

don't you hate it when you have to do that? i grabbed a bunch of o'reilly cookbooks and pocket references just so i don't have to google for stuff like that.
>>
>>47529736
>>47529758
>Using a language you don't know outside when you're learning it.
>Being one of those guys that doesn't know a language inside and out but still uses it
You remind me of this shitty comic. People don't take the proper time to learn things anymore.
>>
>>47529880
I used it because I assumed the guy asking the question was learning java since he asked such an entry-tier question. I was just trying to help. I myself don't actually program, I just know how to think like a computer.
>>
>>47529900
Sorry. I was waiting to come across a scenario where I could post that kind of response.

I'll just make a thread about it.
>>
>>47529384
>CRTs Can do unlimited resolutions, while LCDs Have extremely limited(sometimes even going as low as 800 x 600 as it's max!)
Incorrect. A CRT's resolution is limited by the range of horizontal and vertical frequencies it can sync to. And even if you display a super high resolution display mode, actual resolution is limited by dot pitch. An LCD at native resolution can be quite high res, and is super sharp because the actual subpixels can be controlled individually rather than hoping that pixels will approximately line up with dots.

>CRTs have response times the speed of light, which means no ghosting, or getting used to it while trying to play games!
Incorrect. They can still ghost. It depends on the speed of the phosphors used.

>CRTs don't have input lag.
Only shit LCD TVs have input lag issues.

>CRTs do correct upscaling
No, they don't. See first point. On CRT, every resolution is effectively "scaled" because the pixels will NEVER line up 1:1 with the phosphor dots. It will never be crisp and clear.

>CRTs don't get deadpixels and unfixable driver IC issues. whereas most LCDs you buy within the first year will have a dead pixel, if not already having one out of the box.
You must be buying bargain bin LCDs then. I've never had a dead pixel develop. And yeah I actually have had a CRT's circuitry break or the firmware partially prick itself.

>CRTs have better text(xp, vista, and 7 come with a feature to make text more legible on LCDs)
No they fucking don't. They have blurry text. First LCD I got, the first thing I noticed was how clear the text was.

>sure, LCDs get the job done, but why would you want to use them?
Lighter. Doesn't eat tons of desk space. Doesn't risk breaking your desk if you go much over 21". Doesn't fucking flicker. Crisper, clearer display. One part of the image doesn't move when another part goes from dark to light.
>>
>>47529912
Neat, let us know when it's up.
>>
I would like to start by apologizing to all the CRT users that have horror stories that involve lcdfags, stories that I never believed.

Because today I met my first lcdfag. I was in lecture when the usual guy that sat next to me was either absent or this asshole decided to just take his seat. That's fine I'm cool with it. Half an hour in we started typing, me on my typical 19" CRT and him on a puny little LCD laptop. That thing barely even extended to my own desk. I didn't give a fuck because my CRT was 19" so I had room.

Then this idiot started to do some weird shit with his screen, minimizing and enlarging it. I don't know what he did because I'm a noob at LCDs but it showed like 5-6 screen at one time. Well he was doing this constantly which forced him to miss alot of the notes. So he had to look over to my CRT to read some of the notes he missed because he was fucking around with his LCD screen.

This guy was starting to piss me off. Then he whispered to me, "Your CRT screen is so easy to read it's so crystal-clear." In which I promptly reply, "Maybe if spend the time copying the notes instead of fucking around with your LCD screen then you wouldn't have to copy off me.." He was silent for a while then came back with, "I didn't know you were going to be an asshole about it." I stayed silent then he moved seats because I was about to knock both him and his shitty LCD laptop on the floor. He said, "I'm moving seats," I told him Good GTFO out of here.

I was ready to get in a fight with this fucker. It's not because he owned an LCD but the way he acted while COPYING the notes I take because he was too busy e-cock sucking his tiny monitor.
>>
>>47529963
>>47529927
>>
>>47529724

i think you got "x + 1" and "1" confused?
>>
>>47530417
doubtful, I copypastad the first guy's shit
>>
>>47528735
Autocorrect like iOS
Autofill like Google
Define like Urbandictionary
Meme like 4chan
Watch everyone like NSA
>>
>>47528735
/r/ing the after image
>>
>>47529413
Thread replies: 54
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.