Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Misogynist posted:

Node.js is cool, but JavaScript as a server-side language is seriously hampered by the fact that there's no JavaScript standard library specification for many of the components you'd actually want on the backend (file I/O, networking, etc.). I think the language itself has a lot of promise -- interfacing with MongoDB and using the same language on your frontend, backend, and DB layer seems incredibly cool, for example -- but they need to hammer out some issues before I think it's actually viable in a standards-based sort of way.

Node provides libraries for most of the basic web server stuff and then there are plugins for all the specific things like database interaction. Anyway, the point is not that he should go learn node in order to learn a standard library. The point is that he might want to try node because it's JS without all the DOM/browser interaction bullshit that sucks and ruins the experience.

I do make the assumption that most people hate JS as a language largely because they actually justifiably hate interacting with the browser and don't realize that's A) largely simplified away with jQuery when working in a browser and B) separable from the actual language.

Adbot
ADBOT LOVES YOU

Greencraft
Jan 22, 2005
Flip me off all you want, in a million years we'll all have six fingers.

nielsm posted:

Find some working examples and fool around with those.

Then find the reference manual for the library and read through it. You don't have to remember everything in detail, just make sure you more or less visit everything so you get a feel of what the library is like, what it has and what it does not have, and where to look for the various features.
After looking through the reference, bring out those examples again and try doing more advanced things with them.

Being able to use a reference manual for some programming tool and jump right into it is a skill you will eventually develop, but it takes years.

With iOS development, you also have an advantage of a very controlled runtime environment. You will easily be able to test your game on every reasonable hardware configuration, so you can get away with "whatever works" solutions more often.

Cool thanks. I always used reference manuals like a writer would use a thesaurus, now I know better.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Every once in awhile I'll ask a question like this, get some answers and then get too busy to look in to it. This time I'm resolved to not let that happen.

WTF do I need to look in to to write something like Google+? Not a social network, but interactive, asynchronous, web apps. Not as complex as G+ either, but how awesome it is has got me jealous of devs who know this crap.

I'm a dev, just don't have any experience coding for the web.

Is Node.js that was just mentioned a good starting point for something like this? Anyone have a good high-level overview how this stuff works?

I'll be doing server-side and browser-side stuff if that makes any sense with relation to what I'm asking here...

MrMoo
Sep 14, 2000

Thermopyle posted:

WTF do I need to look in to to write something like Google+? Not a social network, but interactive, asynchronous, web apps. Not as complex as G+ either, but how awesome it is has got me jealous of devs who know this crap.

Have a look at this recent article,

http://highscalability.com/blog/2011/7/12/google-is-built-using-tools-you-can-use-too-closure-java-ser.html

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Thermopyle posted:

Is Node.js that was just mentioned a good starting point for something like this? Anyone have a good high-level overview how this stuff works?

Can be. If Node floats your boat, hit up Socket.IO and play with it. Check the examples and go from there.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Greencraft posted:

Cool thanks. I always used reference manuals like a writer would use a thesaurus, now I know better.

Another big reason to skim the manual is to get some sense of what's included. So if you're faced with a problem, having skimmed the manual, hopefully you think "wait a second that sounds familiar, I think I read something about this..." and you're on your way.

Grey_Area
Dec 21, 2006
Grey Area
This isn't a programming question, but this thread seemed the best fit.

What's the distinction between a network adapter (for ethernet) and an ethernet controller? Presumably an ethernet controller is a chip that fits in a network adapter, but what exactly are the functions that each takes care of?

MrMoo
Sep 14, 2000

The controller is the chip on the NIC that implements the Ethernet logic, have a look at this Intel document for some insight.

http://www.intel.com/Assets/PDF/general/linecard_ec.pdf

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Greencraft posted:

General learning question here. I'm a recent CS grad and I want to build my own Iphone games. I have no real game programming experience but I've been learning to use the Cocos2d engine for about a month. I've managed to learn a few basic things here and there but overall, I'm not making too much progress.

My question is, how do you go about learning a new SDK like Cocos2d? I really feel like I'm just fumbling around. I have an outline of things I want to do programming wise but its a struggle to figure out how to do any of them.

Also read & bookmark this thread.

Grey_Area
Dec 21, 2006
Grey Area

MrMoo posted:

The controller is the chip on the NIC that implements the Ethernet logic, have a look at this Intel document for some insight.

http://www.intel.com/Assets/PDF/general/linecard_ec.pdf

Ok, thanks.

powderific
May 13, 2004

Grimey Drawer
Is there anywhere online where you can pay for small coding jobs (web stuff: tweaking some jquery, helping debug a css layout issue)? Or is there a thread somewhere in SAMart with people doing this? Our programmer has been swamped lately and there are a couple things I'd really like to get fixed on one of our sites, but it could be a while before he has time.

Simbyotic
Aug 24, 2010

THUNDERDOME LOSER
I've downloaded Apache from the Ubuntu Software Center and it seems to be working. (Localhost/ says it is at least) but now, I have no idea how to actually host a website.

I want it say something really simple, written in ruby. It's for testing purposes since I want to learn Ruby.

Any resources you find useful or tips or whatever? I'm really in the shadows here, I don't understand anything of what I found online.

powderific
May 13, 2004

Grimey Drawer
I'm not an expert, but linode's library has lots of great, step by step instructions on that sort of thing. http://library.linode.com/web-servers

Edit: this one in particular may help you: http://library.linode.com/web-servers/apache/installation/ubuntu-10.10-maverick

powderific fucked around with this message at 15:45 on Jul 15, 2011

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Look into the Cherokee web server, which will make this a whole lot easier on a newbie than digging through Apache config files. (Do learn Apache eventually, though; it's the standard in most places for a reason.)

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

powderific posted:

Is there anywhere online where you can pay for small coding jobs (web stuff: tweaking some jquery, helping debug a css layout issue)? Or is there a thread somewhere in SAMart with people doing this? Our programmer has been swamped lately and there are a couple things I'd really like to get fixed on one of our sites, but it could be a while before he has time.

I think there's places like elance.com, but I've never actually used them. The only reason I know they exist is because they showed up in organic serp's for my domain from someone bidding a contract asking to 'make me a site just like <scaramouche's site>'.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Greencraft posted:

General learning question here. I'm a recent CS grad and I want to build my own Iphone games. I have no real game programming experience but I've been learning to use the Cocos2d engine for about a month. I've managed to learn a few basic things here and there but overall, I'm not making too much progress.

My question is, how do you go about learning a new SDK like Cocos2d? I really feel like I'm just fumbling around. I have an outline of things I want to do programming wise but its a struggle to figure out how to do any of them.



http://www.amazon.com/Learn-iPhone-iPad-cocos2d-Development/dp/1430233036/ref=sr_1_2?ie=UTF8&qid=1310781598&sr=8-2

Jose Cuervo
Aug 25, 2004
I am in an Industrial Engineering program, but as part of my research I came up with a piece of code that takes a set of jobs and a set of machines and then uses some scheduling logic to build an actual schedule. I have now been asked to look at the time complexity of the code - from looking this up online it seems that I need to determine how long the code would take to run if it had an input that was 'n' units big. I am not sure how to start doing this, and was wondering if anyone had any pointers as to how I would go about figuring out the time complexity. For example, do I write the code as pseudocode first and then estimate the number of operations each line takes, or ...? And what defines an operation?

NinjaDebugger
Apr 22, 2008


Jose Cuervo posted:

I am in an Industrial Engineering program, but as part of my research I came up with a piece of code that takes a set of jobs and a set of machines and then uses some scheduling logic to build an actual schedule. I have now been asked to look at the time complexity of the code - from looking this up online it seems that I need to determine how long the code would take to run if it had an input that was 'n' units big. I am not sure how to start doing this, and was wondering if anyone had any pointers as to how I would go about figuring out the time complexity. For example, do I write the code as pseudocode first and then estimate the number of operations each line takes, or ...? And what defines an operation?

Time complexity is simple in most cases. When it says you're looking for input of "n", what it really means is that you're looking for what happens when your number of inputs becomes very very large. Since most lines of code that you execute are oneshots that will execute in constant time, as N approaches infinity, the constants become irrelevant. The difference between 2N and N is effectively null.

The first thing you want to look for are loops. A basic loop of standard instructions is time complexity N. That is, the loop has to execute once for each piece of input in n. If you have a loop within a loop, then the inner loop has to execute n times for each loop of the initial loop, so a loop within a loop is n^2, and a loop inside that one is N^3, etc.

The wiki article has a good summary of the time complexity of most basic functions.

http://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions

The main thing to remember is that barring nesting, only the highest time complexity applies. So if you have a triple nested loop in your code, and then later, outside of that, you have a search that's nLog(n) complexity, the nLog(n) disappears, because the n^3 utterly dominates it.

Met48
Mar 15, 2009
I didn't see a dedicated VBScript thread (understandably) so I'm hoping someone here can help. I have a command I'm trying to execute as follows:

code:
dim output: output = ""
dim shell: set shell = CreateObject("WScript.Shell")
dim exec: set exec = shell.Exec("curl.exe --form log^=@upload.zip http://example.com/logs")
do while not exec.StdOut.AtEndOfStream
	output = output & exec.StdOut.ReadLine() & Chr(10)
loop
set exec = nothing
WScript.Echo output
This gives me an output of "error". The problem arises in that the command works perfectly if manually executed through cmd.exe. I'm guessing there's some behind-the-scenes stuff tampering with this but I can't find any documentation. Worse, I've already run some curl commands successfully - one of them just refuses to work and I can't find any way to get more information. StdErr isn't helpful (it does say 100% complete though) and it honestly looks like the server is responding differently to the two requests :confused:.

Edit: I think I've resolved the issue, by adding "%comspec% /c " to the start of the command. I still don't know what's wrong with the original but as long as it works it's fine.

Met48 fucked around with this message at 16:35 on Jul 21, 2011

TheJazzMess
Jan 14, 2008

by angerbeet
Can anyone recommend a good intro to comp sci book? I'm looking for something that will let me get a "feel" for CompSci.

gonadic io
Feb 16, 2011

>>=
If you're looking for a simple introduction to programming, I'd recommend this series of video lectures.

MIT recorded one of their intro to CompSci series of lectures and made it all available on youtube. It teaches Python which I don't personally know, but I've heard is a good language for beginners.

edit: the first lecture is very much about principles of programming as opposed to actually doing some, so don't let it put you off if it all sounds complicated!

gonadic io fucked around with this message at 19:19 on Jul 24, 2011

TheJazzMess
Jan 14, 2008

by angerbeet
Excellent. Thank you.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


TheJazzMess posted:

Can anyone recommend a good intro to comp sci book? I'm looking for something that will let me get a "feel" for CompSci.

If you must have a book, take a look at Computer Science: An Overview or Foundations of Computer Science. If you don't mind sitting in front of a computer for a while, Wikipedia's article on computer science is an excellent overview of the field.

On preview: Most intro CS books are an introduction to programming in the author's favorite language. That is material that you'd have to learn eventually, but you won't get any sense of what computer science is just by learning to program.

Nodrog
Apr 17, 2002

by angerbeet

ultrafilter posted:

If you must have a book, take a look at Computer Science: An Overview or Foundations of Computer Science. If you don't mind sitting in front of a computer for a while, Wikipedia's article on computer science is an excellent overview of the field.
Those books seem to be more about the (to me) more boring aspects of computer science (hardware, lowlevel stuff in a non-programming way, general IT concepts, etc). I guess the key point is that computer science is a really huge field, and that different people are going to enjoy different bits. But a book like that is going to put people off, I think. I mean would you personally read it? Its 200 pages in before it even mentions algorithms.

Nodrog fucked around with this message at 20:44 on Jul 24, 2011

rolleyes
Nov 16, 2006

Sometimes you have to roll the hard... two?
I would point out that a lot of people say they want to do computer science when what they mean is software engineering. It's worth checking out the differences between the two fields before committing.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Nodrog posted:

Those books seem to be more about the (to me) more boring aspects of computer science (hardware, lowlevel stuff in a non-programming way, general IT concepts, etc). I guess the key point is that computer science is a really huge field, and that different people are going to enjoy different bits. But a book like that is going to put people off, I think. I mean would you personally read it? Its 200 pages in before it even mentions algorithms.

I wouldn't read the whole thing cover to cover, but if someone wants to become familiar with the breadth of computer science, reading the introduction to each chapter is a very good way to go about it. Then they can go through and read the chapters that interest them, and maybe skim the rest. There's nothing in either book that's safe to ignore, even if your goal is to be a software engineer.

SnakePlissken
Dec 31, 2009

by zen death robot
I'm hoping somebody has a quick solution for me here. I have a client that requires I submit documents in the form of .prn files, using Windows generic text printer (print to file). So I typically generate the documents in a word processor and then print to file. As far as I can tell so far, the resulting .prn file is just an ASCII file and I can view it in any text editor. Now I want to be able to edit that file in Notepad++ and re-save it also, and it has lot of encoding options, which is where it gets confusing for me. Here they are:

UTF-8 without BOM
UTF-8
UCS-2 Big Endian
UCS-2 Little Endian
ANSI

Now I believe ANSI is right out. So the rest are my options in ASCII, yes, no, maybe? Exactly what encoding do I want these .prn files to be saved in, and am I correct in thinking I can just save an ASCII file with the .prn extension, or edit it in a text editor, without messing up the file? ANSI is right out, right? Got to be ASCII I believe but the encoding stuff is a little rich for my blood.

Any ideas?

tef
May 30, 2004

-> some l-system crap ->
as long as you don't have any funny characters,'UTF-8 without BOM' is what you want.

(UTF8 extends ascii)

SnakePlissken
Dec 31, 2009

by zen death robot

tef posted:

as long as you don't have any funny characters,'UTF-8 without BOM' is what you want.

(UTF8 extends ascii)

Funny characters are not permitted in these docs, I believe. I'll check in w/ the client some more this week. Thanks much for the reply and I'll take any others, too.

Crankit
Feb 7, 2011

HE WATCHES

SnakePlissken posted:

I'm hoping somebody has a quick solution for me here. I have a client that requires I submit documents in the form of .prn files, using Windows generic text printer (print to file). So I typically generate the documents in a word processor and then print to file. As far as I can tell so far, the resulting .prn file is just an ASCII file and I can view it in any text editor. Now I want to be able to edit that file in Notepad++ and re-save it also, and it has lot of encoding options, which is where it gets confusing for me. Here they are:

UTF-8 without BOM
UTF-8
UCS-2 Big Endian
UCS-2 Little Endian
ANSI

Now I believe ANSI is right out. So the rest are my options in ASCII, yes, no, maybe? Exactly what encoding do I want these .prn files to be saved in, and am I correct in thinking I can just save an ASCII file with the .prn extension, or edit it in a text editor, without messing up the file? ANSI is right out, right? Got to be ASCII I believe but the encoding stuff is a little rich for my blood.

Any ideas?

ASCII text is characters 0-127, ANSI is 0-255 and I think UTF would probably re-encode the files and cause funk to happen.

I believe you want to save them as ANSI files.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I am curious about design patterns for communicating between objects like signals/slots, observer, and publish/subscribe. I think I have mixed them up in my mind and I am trying to get some help to distinguish them. Heck, if there are other patterns along the same theme, I am game to hear about them too.

I have two situations where I am dabbling in them:

The first is at home where I have a toy game engine project using a component-based design approach with subsystems. There I think I ended up implementing observer when different entities would tell the subsystem they care about its functions, which would end up putting stuff in a list to do callbacks to the entities. This is how I ended up doing it but I wanted to contrast it with some other common methods.

The second situation is related to some scheming at work. I have started to see a need for a bunch of otherwise disjoint code to be able to communicate information back and forth to each other concurrently if the user so chooses. For example, maybe there is contention for some resource so we want to signal to request the resource and get notified when its available. Or maybe while some program is running we want a background task on another machine to be recording information about the environment, so we have the test harness signal when the program enters and exits its critical section so we can toggle collection. In this case I see things turning into a huge spaghetti pile and I'm trying to figure out how to keep it contained.

SnakePlissken
Dec 31, 2009

by zen death robot

Crankit posted:

ASCII text is characters 0-127, ANSI is 0-255 and I think UTF would probably re-encode the files and cause funk to happen.

I believe you want to save them as ANSI files.

I think this is not so but I'll check. The reason I say this is my client has problems with my files now and then if I edit them in Notepad++ and it saves to ANSI I think by default unless.

Standish
May 21, 2001

Crankit posted:

ASCII text is characters 0-127, ANSI is 0-255 and I think UTF would probably re-encode the files and cause funk to happen.

I believe you want to save them as ANSI files.
"Funny characters are not permitted", presuming that means 0...127 only then UTF-8 will be absolutely bit-for-bit identical to ASCII.

ANSI is an unofficial name for the windows-1252 character set, which is similar to but not identical to the ISO-8859-1 "Western European" character set, all of which have been obsoleted by UTF-8. Seriously if you are doing anything with text just encode everything as UTF-8 from day one, you will thank youself for it later.

SnakePlissken
Dec 31, 2009

by zen death robot

Standish posted:

"Funny characters are not permitted", presuming that means 0...127 only then UTF-8 will be absolutely bit-for-bit identical to ASCII.

ANSI is an unofficial name for the windows-1252 character set, which is similar to but not identical to the ISO-8859-1 "Western European" character set, all of which have been obsoleted by UTF-8. Seriously if you are doing anything with text just encode everything as UTF-8 from day one, you will thank youself for it later.

Right on, thank you very much. Yeah, that's what I take it to mean too, about the funny chars. I'm going to submit a .prn or two this evening and see how it goes. And I think the .prn format we're looking at is pretty old too so I don't think ANSI is what you would want. Now the BOM thing, I may have to look it up. Any takers on what this BOM is?

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
http://unicode.org/faq/utf_bom.html#bom1

You shouldn't need it.

quote:

Where UTF-8 is used transparently in 8-bit environments, the use of a BOM will interfere with any protocol or file format that expects specific ASCII characters at the beginning, such as the use of "#!" of at the beginning of Unix shell scripts.

Janitor Prime fucked around with this message at 16:29 on Jul 25, 2011

TheJazzMess
Jan 14, 2008

by angerbeet

ultrafilter posted:

If you must have a book, take a look at Computer Science: An Overview or Foundations of Computer Science. If you don't mind sitting in front of a computer for a while, Wikipedia's article on computer science is an excellent overview of the field.

On preview: Most intro CS books are an introduction to programming in the author's favorite language. That is material that you'd have to learn eventually, but you won't get any sense of what computer science is just by learning to program.

Thanks but I think the MIT transcripts are enough for now. And yeah I know that CompSci =/= Software Eng. What got me really interested in CS was the Turing machine and some other concepts of the field. I think they are stupefying.

How important is school rank in this field? I am currently going to community college and will be transferring to a 4 year uni (preferably in-state) but I'm not sure if the CS programs at Rutgers/Rowan are any good.

SnakePlissken
Dec 31, 2009

by zen death robot

MEAT TREAT posted:

http://unicode.org/faq/utf_bom.html#bom1

You shouldn't need it.

Great link! Thx!

Reo
Apr 11, 2003

That'll do, Carlos.
That'll do.


Anyone know how I can schedule a web page call in SQL Server 2005? I just need it to go to a certain URL every night that does wrap-up and emails customers a nightly status report.

I'm pretty sure it's possible, I think my coworkers at my last job did it, but I haven't been able to figure out how with CmdExec and batch files yet.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


TheJazzMess posted:

How important is school rank in this field? I am currently going to community college and will be transferring to a 4 year uni (preferably in-state) but I'm not sure if the CS programs at Rutgers/Rowan are any good.

Depends on what you want to do afterwards, but Rutgers is definitely good enough for almost anything you'd want to do. Rowan is probably fine for local employment, but it's not well-known as you get further away from New Jersey, so that might present some issues.

Adbot
ADBOT LOVES YOU

Reisen
Aug 5, 2005

I am an occasional programmer and have to write a program for an experiment we're planning to run. It needs to have (simple 2d) graphics, mostly just putting image files up on the screen. The last time I programmed anything with graphics it was the 90s and I was drawing them line-by-line in Quickbasic. Which of these is the path of least resistance?

1) Learn how to use graphics in Python (pygame would be the way to go, right?)
2) Learn how to use the Java 2d graphics API
3) Learn Actionscript and do it in Flash

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply