Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

0 Members and 5 Guests are viewing this topic.

Go Down

the-pi-guy

The first week of compilers seems like Automata + Programming Languages.
That class is fairly intimidating.  The final project will be a few thousand lines of code, and will be a fully working compiler.  

It's kind of cool to see stuff show up again and again.  This semester I've seen it a lot in my CS courses.   Like automata have been showing up in both my classes.  

darkknightkryta

The first week of compilers seems like Automata + Programming Languages.
That class is fairly intimidating.  The final project will be a few thousand lines of code, and will be a fully working compiler.  

It's kind of cool to see stuff show up again and again.  This semester I've seen it a lot in my CS courses.   Like automata have been showing up in both my classes.  
We bailed translators once it turned into a math class.  But I'm sure you'll love it.

the-pi-guy

Getting into peer to peer vs server client.  

darkknightkryta

Getting into peer to peer vs server client.  
I still remember when we learned about Web 2.0.  P2P was supposed to replace servers.  To save, millions from piracy, corporate america is spending billions in servers.

Legend

I still remember when we learned about Web 2.0.  P2P was supposed to replace servers.  To save, millions from piracy, corporate america is spending billions in servers.
How would p2p work with anything but static html though? 99% of websites nowadays are custom generated just for the person visiting.

darkknightkryta

How would p2p work with anything but static html though? 99% of websites nowadays are custom generated just for the person visiting.
I mean for sharing data.  Like instead of Sony spending god knows how much money on servers, all your DLC/Patches/Updates are all downloaded from each other.

Legend

I mean for sharing data.  Like instead of Sony spending god knows how much money on servers, all your DLC/Patches/Updates are all downloaded from each other.
Ok yeah for just specific files that's more usable. How would that theoretically handle PS4s turning off or going into a game and shutting off the upload?

darkknightkryta

Ok yeah for just specific files that's more usable. How would that theoretically handle PS4s turning off or going into a game and shutting off the upload?
You need servers still.  You just don't need huge server farms.  It brings down costs significantly.  Hell I think even Netflix could work off of P2P to an extent.  Like it wouldn't replace servers, it' just make server load way smaller.

the-pi-guy

Technically you could probably do just about anything with P2P, whether it makes any sense to do it that way is a different question.  

P2P email exists for example.  But to make it work well, you either have to allow emails to be lost, or you have to go to extraordinary lengths to be secure.  

Centralized servers makes more sense for big companies though.  Netflix could do a hybrid like DKK mentioned.

Have clients upload to the movies to other clients.  

the-pi-guy

Just did a networking homework that was about testing out the school website for packets.  

Really sucked.  My computer would get like 1000's of other packets, so I had no idea how many came from the school.  

No idea what to do about it.  

the-pi-guy

Pros of working with someone else:
-Work can get done twice as fast.

Cons:
- When they like things formatted differently than you do.  So they spend several minutes reformatting even though it was already exactly how you liked it.

the-pi-guy

Fellow programmers, how do you like your brackets?
Code: [Select]

public void name(){

}

public void name()
{


}
public void name() {


}

Something else?

What about other stylistic preferences?

darkknightkryta

Fellow programmers, how do you like your brackets?
Code: [Select]

public void name(){

}

public void name()
{


}
public void name() {


}

Something else?

What about other stylistic preferences?
Line them up
{
}
It'll save you headaches later when you go down the rabbit hole.

Legend

First one duh!

Also I do:

if (){

}
else {

}

Really annoying having the else statement on the same line as the if's bracket.

the-pi-guy

First one duh!

Also I do:

if (){

}
Me too!!!


else {

}

Really annoying having the else statement on the same line as the if's bracket.
Uh oh...  
I like the else kind of packed in with the if.  


Line them up
{
}
It'll save you headaches later when you go down the rabbit hole.
A lot of IDEs magically connect them, regardless.

Go Up