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
shrughes
Oct 11, 2008

(call/cc call/cc)

Mustach posted:

I just don't like seeing people miss return statements that are hidden within the same line as two other statements.

Your return statements are even more hidden, because now they sit amongst a swarm of different characters above and below.

Adbot
ADBOT LOVES YOU

Mustach
Mar 2, 2003

In this long line, there's been some real strange genes. You've got 'em all, with some extras thrown in.
I'm not convinced by that argument.

shrughes
Oct 11, 2008

(call/cc call/cc)

Mustach posted:

I'm not convinced by that argument.

What argument? You should be convinced that your measure of code readability is not exactly the same as other peoples'.

pseudorandom name
May 6, 2007

I come here expecting people's minds being blown by Duff's Device, and instead it is some kind of retarded formatting style argument. :(

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

MrMoo posted:


On a bunch of recentish Intel hardware the rep-prefixed string instructions are slower than just doing the loop yourself, no?

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

pseudorandom name posted:

I come here expecting people's minds being blown by Duff's Device, and instead it is some kind of retarded formatting style argument. :(

It isn't quite duff's device that's being presented here, although it is a very close cousin

pseudorandom name
May 6, 2007

Otto Skorzeny posted:

It isn't quite duff's device that's being presented here, although it is a very close cousin

Oh, I know that, but Duff's Device is the only thing related to loop unrolling that I could think of that would result in an explosion of posting.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Oh :( I see why you're disappointed

Harold Ramis Drugs
Dec 6, 2010

by Y Kant Ozma Post
I've just started into some CS coursework that should last me the rest of the year. I'm pretty set on buying a little netbook to install linux or ubuntu on, and I'm not really sure what to look for. What are some of the features (other than price) I should look for in a dedicated python/java/C++ programming computer? Which OS would be best/easiest for a newbie to programming?

Right now, I'm using a large power-hungry Windows 7 gaming laptop that is definitely not practical for toting to class every day.

Mustach
Mar 2, 2003

In this long line, there's been some real strange genes. You've got 'em all, with some extras thrown in.

shrughes posted:

What argument? You should be convinced that your measure of code readability is not exactly the same as other peoples'.
Haha, right back at ya, I guess?

shrughes
Oct 11, 2008

(call/cc call/cc)

Harold Ramis Drugs posted:

I've just started into some CS coursework that should last me the rest of the year. I'm pretty set on buying a little netbook to install linux or ubuntu on, and I'm not really sure what to look for. What are some of the features (other than price) I should look for in a dedicated python/java/C++ programming computer? Which OS would be best/easiest for a newbie to programming?

Ubuntu would be the easy and appropriate.

For a dedicated programming computer, the features you want are: a good keyboard, a good mouse, and 1366x768 resolution (as opposed to 1024x600. Really you want better, but then it wouldn't be a netbook). The best netbook would definitely be the X120e with an E-350 processor. Its keyboard is allegedly the best of all netbooks and laptops out today, and a trackpoint mouse is of course necessary :eng101:. It's $480 on Amazon, the E-240 version is $370.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

Harold Ramis Drugs posted:

I've just started into some CS coursework that should last me the rest of the year. I'm pretty set on buying a little netbook to install linux or ubuntu on, and I'm not really sure what to look for. What are some of the features (other than price) I should look for in a dedicated python/java/C++ programming computer? Which OS would be best/easiest for a newbie to programming?

Right now, I'm using a large power-hungry Windows 7 gaming laptop that is definitely not practical for toting to class every day.

Seconding all the things shrughes mentioned, including the x120e recommendation if you can get your hands on one (there have been some issues with the E350 processors selling faster than they can make them). I have one and it is a very nice little netbook.

One thing I'd add if your budget allows is getting a full-sized external monitor. You certainly can do all your work on a netbook monitor, but once you have your code window open along with several several watch list/local variable/properties/project navigation/documentation windows up you run out of screen space really fast. I find myself spending a lot of time managing screen space and alt+tabbing when I'm working on the netbook instead of working on the program. If you plan to do a lot of coding work over the years the ability to plug into a full screen for longer homework sessions might be a good investment.

MrMoo
Sep 14, 2000

Otto Skorzeny posted:

On a bunch of recentish Intel hardware the rep-prefixed string instructions are slower than just doing the loop yourself, no?

The 64-bit moves listed here I guess, its fundamentally a rep movsq

https://patchwork.kernel.org/patch/61240/

Fists Up
Apr 9, 2007

For work I need to make a map of all the countries that we sell into.

I have a list of 120 countries and am trying to find the best way to somehow import that into a map program that then goes into a powerpoint presentation. The tedious way would be to get a blank map and then just put a marker on each country but i've only got paint to work on with this computer.

I noticed that wikipedia uses SVG maps which would allow me to make a fairly interesting map with all the countries highlighted in a colour to stand out a bit more and its all free reign to use their map commercially.

Except I have no idea how to do any of this. If I have the blank world map in svg form where do I go to from there? Or is there a better way?

EDIT: I've also dumped the countries into a batch google mapping thing which looks good but I dont think theres anyway to save the actual map in a decent size. As zooming it all out to see every country doesnt make it very clear.

Fists Up fucked around with this message at 05:31 on Jul 4, 2011

rolleyes
Nov 16, 2006

Sometimes you have to roll the hard... two?

Fists Up posted:

EDIT: I've also dumped the countries into a batch google mapping thing which looks good but I dont think theres anyway to save the actual map in a decent size. As zooming it all out to see every country doesnt make it very clear.

Can't help with the first bit but if you're really stuck you can make a 4000 x 4000 canvas (or whatever size you need) in Paint then screenshot the map in sections, paste them in and drag them into position. Ghetto as hell but it ought to work.

If you have the rights to do so and your IT dept. won't kill you then I suggest installing Paint.NET as it supports layers and will make this kind of thing a bazillion times less frustrating if you make a mistake.

Munkeymon
Aug 14, 2003

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



I think he means the chart API. It'll make heat maps from actual world and country maps on the fly but not large ones.

http://inkscape.org/ is an open source GUI-based SVG editor. It has a lot of features

http://codeboje.de/pysvg/ might be helpful to mash the data together, but I don't know enough about SVG structure to say for sure just how helpful it would be

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


I'm a web developer not long out of college. My previous job did everything in VB.net, and after learning a bit of it and transferring jobs, I've been doing everything in C#.Net, but want to get better. First step at learning C# better was to buy the Head First C# book, and the O'Reilly C# reference (I have background in Java so it's not that alien to me). However, the head first C# book is great at learning C#, it's not so great at teaching C# as code-behind in an aspx. Is there some recommended reading?

tronester
Aug 12, 2004
People hear what they want to hear.
We have a client that wants our integrated document imaging to incorporate Windows Security to create and view images from within our software.

We went to the trouble of having our software take the input file (JPEG,TIFF,PDF, etc) Compress it using JPEG compression, then save the file as an encrypted PDF so that no one can view the file. His accounting software does not (can not?) accept encrypted PDF's, so I am having to redesign our software right now to do the following:

1. Create a temporary drive map using the WScript.Network object, and use administrative credentials stored in a database table to connect to an image store.
code:
Set Net1 = CreateObject("WScript.Network")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Net1.MapNetworkDrive "", Share, False, UName, Pwd
2. copy the files.

3. Disconnect the drive map.
code:
Net1.RemoveNetworkDrive Share, True, False
To view the files, step 1, then use our imaging software's API to view the image, then step 3.

It seems that it would be a lot easier to just use a method that allowed alternate credentials to copy the files. This portion is using VBscript to accomplish these tasks.

Any suggestions on alternate code to use to copy the files without having the user having access to the share other than within the software?

nielsm
Jun 1, 2009



tronester posted:

Any suggestions on alternate code to use to copy the files without having the user having access to the share other than within the software?

I'm not sure how feasible this actually is, but have a write-only "drop box" folder per user on the network, where a server-ish application (which has full access) will then take a file from on request or otherwise.
It could probably also be a shared (not per-user) drop box folder where the appropriate user group has write access to.

submarines
May 9, 2010
I am trying to set up an error logging system in access, in which I have the following 4 components;

1) A "source table", which I fetch all the data from
2) A "view form", which basically just shows the source table, but looks prettier and is locked for editing.
3) A "new form", which works so we can skip that
4) A "edit form", which when brought up allows editing of the selected entry.

I want the edit form to appear when I double click a cell (via on Dbl click) in the view form. The problem is that with my current macro, it always brings up the first entry, regardless of where I click, which leads me to believe that my filter is rubbish.


quote:

pre:
                                  SetTempVar   CurrentFilter; [Forms]![View].[Filter]
[TempVars]![CurrentFilter]=""     SetTempVar   CurrentFilter; ="[ID] <> 0"
IsNumeric([ID])=True              OpenForm     Details; Form; ; =[TempVars]![CurrentFilter]; ; Normal

Are there easier ways of doing this? Maybe a "current selection" argument?

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
I have an old VB6 game that does not run on Windows 7. Immediately upon startup, I get:

Run-time error '429':
ActiveX component can't create object

Google searches for this don't really yield much useful information, often the suggestion is to 'update DirectX.' This was a game I created many years ago using an old version of DirectX, probably 7 or something. I'm not sure if there's a more appropriate thread for this, if anyone has any experience with this or knows of a better thread to post it in, that would be great.

ninjeff
Jan 19, 2004

Orzo posted:

I have an old VB6 game that does not run on Windows 7. Immediately upon startup, I get:

Run-time error '429':
ActiveX component can't create object

Google searches for this don't really yield much useful information, often the suggestion is to 'update DirectX.' This was a game I created many years ago using an old version of DirectX, probably 7 or something. I'm not sure if there's a more appropriate thread for this, if anyone has any experience with this or knows of a better thread to post it in, that would be great.

I think this message means a COM DLL isn't registered correctly for some reason. Not sure how you would figure out which DLL it was meant to be without looking at the source or disassembling it. Do you still have the source?

G-Dub
Dec 28, 2004

The Gonz
We get this error in work a lot because of problems with dao360.dll, but I guess it could be anything.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

ninjeff posted:

I think this message means a COM DLL isn't registered correctly for some reason. Not sure how you would figure out which DLL it was meant to be without looking at the source or disassembling it. Do you still have the source?
I have the source, yes. I'll try searching for the dll names involved and see if anything comes up. I suspect it could be vbrun600.dll

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Orzo posted:

I have the source, yes. I'll try searching for the dll names involved and see if anything comes up. I suspect it could be vbrun600.dll

Another thing you could try is opening the original project in VS2010; I've converted a couple of projects that way. VS detects that it's an old school file and tries to 'convert' it.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Actually, I figured it out. It was dx7vb.dll that was missing.

Edit: it was for this, http://forums.somethingawful.com/showthread.php?threadid=3423863

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!

What do you guys do for inspiration and ideas in your personal projects?

I started doing an iPhone game (puzzle game clone), and I'll probably finish that. But I can't think of anything to make. I started writing a message board but I got bored with that once I got most of the basic stuff working.

I think that's my problem, I only get interested in a project enough to figure out the implementation, then I drift away. The other half of the problem is that I'm burned out from writing soul-less healthcare apps in Ruby all day at work.

I find it tedious working through book examples and doing basic stuff in a new language. I'd rather jump right in and start working on my project. After having done quite a few different languages, a dialog and a button are just a dialog and a button.

qntm
Jun 17, 2009

Bob Morales posted:

What do you guys do for inspiration and ideas in your personal projects?

I started doing an iPhone game (puzzle game clone), and I'll probably finish that. But I can't think of anything to make. I started writing a message board but I got bored with that once I got most of the basic stuff working.

I think that's my problem, I only get interested in a project enough to figure out the implementation, then I drift away. The other half of the problem is that I'm burned out from writing soul-less healthcare apps in Ruby all day at work.

I find it tedious working through book examples and doing basic stuff in a new language. I'd rather jump right in and start working on my project. After having done quite a few different languages, a dialog and a button are just a dialog and a button.

Nonsensical whims are the mother of invention. Coding projects that I have to hand:

* A Perl script which I wrote to brute-force the solution to a Rubik's Cube-like puzzle which somebody got me as a gift
* A Perl script which graphs historic federal U.S. income tax rates (???)
* Parser combinators for PHP
* A Python script which can compute the intersection between two regular expressions (this needed a lot of stuff about finite state machines and parsing which was quite difficult - but it was a great way to learn Python for the first time)
* A JavaScript Tetris game which always gives you the worst pieces (conclusion from this experiment: JavaScript is horrible)
* A Java program which detects edges and corners in screenshots
* A Visual Basic application thingy which lets me easily tile windows

There must be something that irritates you about modern computing. Or there must be an app you need (and not a puzzle game either, the only reason you need a puzzle game is to sell it to other people, which means making it qualifies as work, not fun). For example, I want an app which remembers where I parked, and then shows me a big glowing Augmented Reality car when I point the phone at the car park from outside. Make that.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Everything qntm said is a great idea. Adding to that, writing your own programming language is an endless rabbit-hole of fun. You can always get more sophisticated or tear everything apart and start over.

A while back I started getting interested in Forth, and I eventually concluded that writing your own implementation and customizing it to suit your needs is in the spirit of the language. I combined that with an old idea for a simple game-oriented VM and now I have an idealized virtual game console and a compiler that targets it. To test it, I've been writing all sorts of tech demos and little games. Along the way, I've had to develop numerical routines, a map editor, benchmarking utilities and more.

If your goal is to learn, rather than make something useful, just think of any application you've seen that you find interesting and that you don't know exactly how to write. Physics simulations, filters, obscure data structures, etc.

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!

Internet Janitor posted:

If your goal is to learn, rather than make something useful, just think of any application you've seen that you find interesting and that you don't know exactly how to write. Physics simulations, filters, obscure data structures, etc.

It's a mental/creative thing, almost like writers block.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

qntm posted:

* A JavaScript Tetris game which always gives you the worst pieces (conclusion from this experiment: JavaScript is horrible).

Incorrect*! It's actually pretty good if you ignore the stupid stuff. If you ever feel the JavaScript itch again, check out CoffeeScript, which makes it trivial to stick to useful parts of JavaScript.

* I know it's subjective but I really think you're selling it short, so consider this encouragement not to reject it so fast.

qntm
Jun 17, 2009

pokeyman posted:

Incorrect*! It's actually pretty good if you ignore the stupid stuff. If you ever feel the JavaScript itch again, check out CoffeeScript, which makes it trivial to stick to useful parts of JavaScript.

* I know it's subjective but I really think you're selling it short, so consider this encouragement not to reject it so fast.

I'm going to get java script: The Good Parts at some point, but it's down my list somewhere, past "Write a silly web app entirely in Haskell", "Learn some elementary system administration", "Write my own programming language, with blackjack, and hookers" and so on.

EDIT: I guess SA doesn't like it when you put the word "JavaScript" inside markup

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

qntm posted:

I'm going to get java script: The Good Parts at some point, but it's down my list somewhere, past "Write a silly web app entirely in Haskell", "Learn some elementary system administration", "Write my own programming language, with blackjack, and hookers" and so on.

EDIT: I guess SA doesn't like it when you put the word "JavaScript" inside markup


A quote from java script: the Good Parts which seems rather appropriate:

Douglas Crockford posted:

JavaScript is most despised because it isn't SOME OTHER LANGUAGE. If you are good in SOME OTHER LANGUAGE and you have to program in an environment that only supports JavaScript, then you are forced to use JavaScript, and that is annoying. Most people in that situation don't even bother to learn JavaScript first, and then they are surprised when JavaScript turns out to have significant differences from the SOME OTHER LANGUAGE they would rather be using, and that those difference matter.


JS is far from perfect, but I find that quote to pretty much be spot on when I have worked with people who rant about it. Not that you are one of those people... just that your post made me think of that quote.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
I have a very large C project that was written to be dependent on a big-endian processor. We're tired of paying extreme amounts of money for big-endian machines to do large processing work where we could just port it and fix it instead. Is there any tool that can do a (good) analysis on the code base? The problem is that the code is really loving stupid and it's near impossible to follow, so we really need something can follow a variable throughout it's life and see where it get's cast to a pointer and manipulated at the byte level.

I've already fixed all the dumb-poo poo "this processor returns 0 on divide by 0 errors so lets leverage that" type stuff. There's just no way in hell I can figure out how to isolate all these endian-dependent items.

Is there anything out there that can do this?

nielsm
Jun 1, 2009



CRIP EATIN BREAD posted:

we really need something can follow a variable throughout it's life and see where it get's cast to a pointer and manipulated at the byte level.

Some kind of static analysis tool, probably. Maybe you could make Clang do some of the heavy lifting for you, but I'm guessing you'd still have to write some custom code to actually detect the endianness-issues. Or it might already exist.
Anyway, static analysis is your keyword.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

nielsm posted:

Some kind of static analysis tool, probably. Maybe you could make Clang do some of the heavy lifting for you, but I'm guessing you'd still have to write some custom code to actually detect the endianness-issues. Or it might already exist.
Anyway, static analysis is your keyword.

Yeah, I've considered writing a plugin for clang to help me, but I was hoping there was another solution. I've looked at all sorts of static analysis tools, and the only one I found that even mentions it is Klocwork, and the cost starts around $26,000. There's also an IBM tool that allegedly helps, but you need to be in some special program to download it. There's almost no information on it so that's not very promising either.

Munkeymon
Aug 14, 2003

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



qntm posted:

I'm going to get java script: The Good Parts at some point, but it's down my list somewhere, past "Write a silly web app entirely in Haskell", "Learn some elementary system administration", "Write my own programming language, with blackjack, and hookers" and so on.

You should try writing a silly web app in on node.js - no DOM interaction poo poo and almost all of the modern language features are available.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Munkeymon posted:

You should try writing a silly web app in on node.js - no DOM interaction poo poo and almost all of the modern language features are available.
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.

Greencraft
Jan 22, 2005
Flip me off all you want, in a million years we'll all have six fingers.
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.

Adbot
ADBOT LOVES YOU

nielsm
Jun 1, 2009



Greencraft posted:

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.

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.

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