|
Not so much programming but a learning question for a newbie. I have Programming in Java and Database Systems (T-SQL) courses in the Fall, so I am reading up on Java currently. I am working my way up from simple I/O stuff and getting to the better stuff later on. I was wondering if I should also try to incorporate T-SQL at the same time as I'm learning Java, or should I get through learning Java first, then after I get through the book on Java (http://math.hws.edu/javanotes/) go ahead and read up on T-SQL, most likely through the summer? I was looking at the first few pages of a SQL beginners guide and it was talking about lists and tables fro the get go, which won't be covered for another 2 chapters or so in Java.
|
# ? Apr 10, 2009 23:31 |
|
|
# ? May 15, 2024 14:21 |
|
Lists and tables in SQL are conceptually different from lists and tables in Java — either very different (if you're talking about the Java widget classes) or somewhat different (if you're talking about the Java data structures). I would recommend getting fairly comfortable with basic programming, data structures, and algorithms before starting with databases.
|
# ? Apr 10, 2009 23:47 |
|
I'm making the matlab -> python leap right now with a fairly complex program (i have not coded it in matlab, starting from scratch in python), not realizing I was going to have to completely re-learn how to think computer and design program. Can anyone recommend a good way to get up to speed on OOP paradigms/design strategies/tools? I've done a bit of java UML WAAAAAY back in the day, and only once for a CS-101 class freshman year. I've read the wiki page on Design Patterns, but that doesn't give me a whole lot to go off of. Please help. Keeping these classes straight and deciding what functionality goes where (and remembering where it is and why) is making my brain hurt. If there is a specific pattern that would work particularly well for my problem, what would it be? I'm simulating a production process by modeling workers on a factory floor as agents. I have a "master" class that holds all parts and agents in two dictionaries, and which advances the simulation time and handles agent task scheduling. Parts are built into assemblies by agents, and then passed on to the next agent in the process. I keep thinking I should try and maintain functionality where it is in the physical system, but when I finally get down to it there are too many ways of doing things and I can't seem to settle on one way since I have no idea what is better. I'm going to be doing a lot of this in the future for grad school... is it worth it to take a low-level software engineering course, or should I just man up and teach myself? Is there that much to know? Spime Wrangler fucked around with this message at 04:40 on Apr 14, 2009 |
# ? Apr 14, 2009 04:01 |
|
I'm interested in doing some AI programming. Anyone know any websites that offer some good exercises for doing this kind of stuff?
|
# ? Apr 14, 2009 08:01 |
|
Spime Wrangler posted:I'm going to be doing a lot of this in the future for grad school... is it worth it to take a low-level software engineering course, or should I just man up and teach myself? Is there that much to know? Good design solves a lot more problems than a good implementation does, so yes, it's certainly worth learning more about and probably worth taking a course. It just so happens there's a pretty good tutorial/introduction to Stackless Python that models a factory/machine/parts simulation -- they have examples in both Stackless and non-Stackless Python, probably worth taking a look at: http://members.verizon.net/olsongt/stackless/why_stackless.html#the-factory
|
# ? Apr 14, 2009 13:44 |
|
Spime Wrangler posted:I'm making the matlab -> python leap right now with a fairly complex program (i have not coded it in matlab, starting from scratch in python), not realizing I was going to have to completely re-learn how to think computer and design program. As an aside, I'll say that while the design patterns are helpful, you want a good solid grounding in OO principles before you attempt to figure them out and begin using them. You want to avoid the trap of fitting the problem to the patterns and not the patterns to the problem.
|
# ? Apr 14, 2009 15:59 |
|
The Dissonant posted:I'm interested in doing some AI programming. Anyone know any websites that offer some good exercises for doing this kind of stuff? You're going to want to get a book. I highly recommend Russel and Norvig's AI: A Modern Approach.
|
# ? Apr 14, 2009 21:10 |
|
Awesome, thanks for the advice. That stackless tutorial is loving awesome. I've been looking all over the place for something like that.
|
# ? Apr 14, 2009 22:20 |
|
NM - used powershell instead!
Solaron fucked around with this message at 16:53 on Apr 16, 2009 |
# ? Apr 16, 2009 15:34 |
|
Okay, I have a question about dialog boxes: basically, how do I make one? I'm making a game where, at forks in the road, a dialog box pops up to ask which way the player wants to go. Nothing too complicated, but apparently whenever I try to look up the basics of dialog boxes, all I can find are how to call them in various languages, not how to make them (I'm programming in C#, if that makes a difference). All I need to know is how to make a dialog box that can return to me a reply from the user. Oh, I guess I should mention that I don't mean a true dialog box, ie where it's a separate window in itself. I just need a little box that pops up, in-application. Morpheus fucked around with this message at 09:01 on Apr 19, 2009 |
# ? Apr 19, 2009 08:57 |
|
Google "C# dialog box"
|
# ? Apr 19, 2009 10:20 |
|
The Dissonant posted:I'm interested in doing some AI programming. Anyone know any websites that offer some good exercises for doing this kind of stuff?
|
# ? Apr 19, 2009 20:10 |
|
subversion question: is there a command that allows one to see commits per author in the repo?
|
# ? Apr 20, 2009 00:22 |
|
ignorant slut posted:subversion question: Version control megathread, which I am right now adding to the megathread list in the OP.
|
# ? Apr 20, 2009 05:42 |
|
Edit: Whoops, would of been more appropriate to post this in the java questions thread.
UR MR GAY fucked around with this message at 07:02 on Apr 20, 2009 |
# ? Apr 20, 2009 06:59 |
|
I'm working on an implementation of A* pathfinding on a Java platform on which "object/array instantiation are expensive" and there is no JIT, which may or may not be theoretical, the brief doesn't say. I'm leaning towards using a binary heap to implement the priority queue, since it can be flattened into a single large array to reduce object instantiation (the pathfinding is on a 2D grid at most 128x128, so points can be encoded as integers.) Obviously the complexity of insert, pop, and decrease_key are O(lg n) (where n is the size of the 2D grid) with a binary heap implementation, but I'm trying to work out if this can be optimised by partitioning the array into m "buckets" which can each only hold a certain range of integers, and order the buckets based on their lowest priority item. Then there would be at most n/m items in each bucket, and insertion would require one operations which is O(lg n/m) to insert the item into its bucket and one operation which is O(lg m) to reorder the buckets. The problem I have is - is this actually a speedup? I would combine the costs of each step to make the whole algorithm O(lg m + lg n/m), but because (lg m + lg n/m) = (lg m(n/m) = (lg n), it seems like I would not actually save anything. Is this a problem with me calculating the complexity, or is the initial idea just worthless? Edit: Well, floWenoL pointed out my dumb mistake on #cobol, which is that m is a constant factor. Bizarro Buddha fucked around with this message at 10:00 on Apr 22, 2009 |
# ? Apr 22, 2009 09:50 |
|
On a website I work on, users pay to download high resolution images. When they get to the download screen at the moment there are thumbnails for each image, and users right click and press "save target as" to download the high resolution image. However, some users click "save image as" instead and end up just getting the thumbnail. I was wondering if anyone knows of a more desirable way of doing this, to stop people getting the right version. Originally we had a text link for each image, but it was a bit ugly. We'd prefer not to go back to that if possible. Is there perhaps a way to force a redirect from the thumbnail to the high resolution image?
|
# ? Apr 22, 2009 11:24 |
|
Vince McMahon posted:Is there perhaps a way to force a redirect from the thumbnail to the high resolution image? No browser would request the thumbnail URI again, and that's such a specific need that I doubt any browser supports it. Could you instead direct your users to click the thumbnail then save that image?
|
# ? Apr 22, 2009 11:40 |
|
Sartak posted:No browser would request the thumbnail URI again, and that's such a specific need that I doubt any browser supports it. I was thinking of a mod_rewrite type thing, but I don't know much about it. At the moment we tell them to either click the thumbnail and save the page/picture, or right-click, save target as. We still end up with people doing the wrong thing though. I guess it's hard to tailor for every single user. Your avatar just reminded me of that scene and now I'm having trouble stifling my laughter.
|
# ? Apr 22, 2009 11:54 |
|
You could replace the normal right-click menu with your own using Javascript. It probably wouldn't work on every browser, but should get most of your problem users taken care of that way. Woah, that avatar change weirded me out for a second.
|
# ? Apr 22, 2009 14:42 |
|
Is there a good tool for replacing accented characters with their closest western equivalent? Replace all the accented versions of e with e, for instance. I can use Python, perl, lisp, Java, and maybe something else if necessary. Google found me Text::Undiacritic in CPAN but it gives bad output (Cám -> CA�m, dís -> dA�s). It only needs to handle spanish and french accents (cedilles, diaereses, and the accents aigu/grave/circonflex) not crazy "lower letter thorn with stroke" or anything.
|
# ? Apr 22, 2009 15:26 |
|
Vince McMahon posted:However, some users click "save image as" instead and end up just getting the thumbnail. Perhaps you can replace the thumbnail imgs with divs with the thumbnail as background image so that no "save image as" option appears to begin with?
|
# ? Apr 22, 2009 18:27 |
|
kaschei posted:Is there a good tool for replacing accented characters with their closest western equivalent?
|
# ? Apr 22, 2009 19:42 |
|
Standish posted:iconv, with the //TRANSLIT flag. Wow, I tried that before (not using the TRANSLIT flag) and it barfed on the first non-representable character and I gave up. I blame my school for not having man set up properly on the linux thin clients. Thanks a bunch.
|
# ? Apr 22, 2009 19:49 |
|
stupid question: Is it possible to make a program to access a website and do whatever it is that you do on that website without the site having an api? (im not sure if thats the best way to ask this..)
|
# ? Apr 23, 2009 03:36 |
L:ordSilent posted:stupid question: Yea, typically this is possible to do. I've used cURL to do this. Google for things like "http post <language>" and you can find all kinds of examples in php, python, java, etc fletcher fucked around with this message at 03:59 on Apr 23, 2009 |
|
# ? Apr 23, 2009 03:57 |
|
kaschei posted:Is there a good tool for replacing accented characters with their closest western equivalent? In python here is a function unicodedata.normalize(form, unistr) I can't recall the right argument off hand though.
|
# ? Apr 23, 2009 16:26 |
|
nevermind figured out using much more elaborate methods heh....
Pweller fucked around with this message at 16:56 on Apr 23, 2009 |
# ? Apr 23, 2009 16:42 |
|
Can someone please explain the difference between verilog "<=" and "="?
|
# ? Apr 23, 2009 17:50 |
|
astr0man posted:Can someone please explain the difference between verilog "<=" and "="? The "=" operator performs value propagation immediately. This means that if you have registers foo and bar, this code code:
code:
|
# ? Apr 23, 2009 17:55 |
|
L:ordSilent posted:Is it possible to make a program to access a website and do whatever it is that you do on that website without the site having an api? (im not sure if thats the best way to ask this..) The brief answer is that yes, on some level it is always possible to write programs which exactly mimic a user's behavior on a website. This can be somewhat difficult and involved, depending on the technical characteristics of the site and what precisely you want to simulate. And, of course, if the website hasn't published any sort of API, then they've made no commitment to not change things around and totally screw over your attempt at automation — in fact, depending on the site, they might do this on purpose.
|
# ? Apr 23, 2009 19:17 |
|
L:ordSilent posted:stupid question: Do you mean like client interaction (clicking on stuff, typing on stuff)? Or just pulling what data you get from certain URLs? The former is way harder than the latter. The latter can be done with curl or the http facilities that tons of languages have. For the former you need something like Selenium or Windmill or Watir.
|
# ? Apr 23, 2009 19:27 |
|
L:ordSilent posted:stupid question: I've done this for a living, it isn't fun. One of the web unit testing frameworks will allow you to simulate user input, but it isn't good for heavy loads or fast requests.
|
# ? Apr 24, 2009 00:58 |
|
I'm writing a C# program and this will seem pretty basic, but I'm not sure on the "proper" control flow. I want the program to start up in a screen saver type mode. Clicking opens up another small form, and hides the screen saver. The small form launches the main form, and then hides itself. Exiting the main form shows the screen saver form again. So right now I have something like this: ScreenSaverForm.cs - Launch SmallForm.cs - this.Hide() SmallForm.cs - Launch MainForm.cs - this.Hide() MainForm.cs - on event FormClosing- ? Of course I can pass the ScreenSaverForm reference to SmallForm, and then from SmallForm to MainForm, but this seems a bit messy. Actually the entire thing strikes me as sloppy. There should be some other way of doing this.
|
# ? Apr 24, 2009 05:10 |
|
No Safe Word posted:Do you mean like client interaction (clicking on stuff, typing on stuff)? Or just pulling what data you get from certain URLs? Its more of me trying to bypass accessing their website. Kind of like a twitter app minus the handy api. Im not sure how to explain it without going into detail.
|
# ? Apr 24, 2009 05:45 |
|
L:ordSilent posted:Its more of me trying to bypass accessing their website. Kind of like a twitter app minus the handy api. Im not sure how to explain it without going into detail. So go into detail. You haven't even explained whether you want to be able to send input to it or not, or just pull data.
|
# ? Apr 24, 2009 12:34 |
|
I want to make it take my login info for the site, login, display what I want some of the things from my "home" screen and the ability to get to the part of the site where i make an entry and submit it.
|
# ? Apr 25, 2009 02:09 |
|
That can all be done in the "easy" methods people were talking about. An example: 1. Send the login info with an HTTP POST via cURL. 2. Parse the data that you want returned on the homepage (which should be the result you get back from step 1. If not, just do a simple HTTP GET for the home page once curl has the session/cookie for authentication.) 3. Make another HTTP POST via cURL for entering other data. (again, using session/cookie data obtained from login). Keep in mind that this is assuming the site uses "normal" methods of handling these transactions. For instance, you could do something like this with a site like amazon or stock forum software. If the site is doing the login/shopping/posting/whatever via pure javascript or flash or god knows what then there might be a problem. Odds are this won't apply to you, though. http://curl.haxx.se Bhaal fucked around with this message at 07:38 on Apr 25, 2009 |
# ? Apr 25, 2009 07:32 |
|
Not exactly a programming question per se, but what's a good introduction to functional programming? I see a lot of people in CoC talking about it, and it looks interesting. In my programming languages course in college, we touched very very lightly on Scheme and StandardML but nothing deep enough to really grasp the difference in paradigm.
|
# ? Apr 26, 2009 19:27 |
|
|
# ? May 15, 2024 14:21 |
|
If you can't decide which language to learn, flip a coin. I would suggest using something not too astray from what you are used to (i.e a dynamicly typed functional language, before having fun with type inference). SICP is a good text if you want to learn scheme, although large and dense. I am sure there are shorter texts. DrScheme is also a great IDE/Environment to learn in (so I am told). Scheme is really geared towards learning to program and the documentation and tools available are mostly to that end. Haskell, although useful is still the experimental stomping ground of new functional features. Monads can be understood, but that doesn't mean it will be straight forward using them well. (Haskell is also lazy). ML or some of its dialects are eagerly evaluated, so it is a little more straight forward to reason about what the code is doing when, but it can make some things awkward. If you're going to look at ml - ocaml or f# if you're on windows might be worth looking at too. On the whole, I would say if you want to learn the most, read as much sicp as you can, and do exercises in scheme.
|
# ? Apr 26, 2009 20:02 |