|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On March 18 2012 10:07 Manit0u wrote:Show nested quote +On March 17 2012 14:29 Millitron wrote:On March 17 2012 08:53 Manit0u wrote:On March 17 2012 08:23 Millitron wrote:On March 17 2012 05:47 MisterD wrote:it boils down to either making your robot stuff a .dll (or linux equivalent) and using it with a native interface in java, or writing a c++ standalone host application that gets sent commands via network sockets. The latter is certainly more work, as you have to write a proper network handler in c++ in addition to the java client, but on the other hand allows you to easily write a lot more clients and implement remote-control through lan/wlan/internet. that google proto stuff that someone linked seems to be just a marshalling format, i suppose this would help in the socket approach as you can just create java and c++ stucts for your data objects which both use the same marshalling format, so you can easily flatten data into a network stream and reconstruct it at the other end. So if you go this way, that might be helpful. for direct method invocation through native interfaces, it's probably rather irrelevant. /edit: java can start other programs, have a look at http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html I'm looking into the Runtime API, and I'm wondering, can the output stream of the runtime object act as the console for the C++ program? So instead of dealing with native interfaces or networking, I could just have the C++ program read the instructions from the console? I'm thinking that from the C++ program's point of view, a console is a console, it doesn't really care what fills in the prompts on the console, does it? Wouldn't it be possible to just re-write the touch screen GUI in C++? Having 2 different languages operating the same robot seems like a bitch to maintain and more trouble than actual help. The biggest advantage for us using Java for the GUI is that we can test it on any computer, not just the robot. We could write the GUI in C++ I suppose, but to be able to test it on a normal PC, it would have to be completely separate from the robot's code anyways. Because of the file structure and operating system on the robot, it is pretty difficult to install stuff to it. If it was written directly into the robot's code, it would have to be compiled and re-installed every time we made a change, which would be a huge pain. So this means we pretty much need two programs anyways, 1 for the GUI, one for the robot's motion. And if we already need two programs, we may as well have the GUI in Java, so when I graduate, other students at my school can easily pick up where I left off, since Java is taught freshman year. Well, if you have stuff in C++ in the robot OS, I hardly see a problem. Especially that GUI like wxWidgets (which I'm just getting into) is platform-independent and pretty damn neat. http://www.wxwidgets.org/From the 'about': Show nested quote + wxWidgets is a C++ library that lets developers create applications for Windows, OS X, Linux and UNIX on 32-bit and 64-bit architectures as well as several mobile platforms including Windows Mobile, iPhone SDK and embedded GTK+. It has popular language bindings for Python, Perl, Ruby and many other languages. Unlike other cross-platform toolkits, wxWidgets gives its applications a truly native look and feel because it uses the platform's native API rather than emulating the GUI. It's also extensive, free, open-source and mature.
This solves the problem of needing to recompile on the robot for every single test version, but then we still have the problem that C++ is not something that everyone at my school learns. I myself know enough to do it, but I'm only going to be there another year. So we're trying to have as much as possible written in Java, since everyone in CS here knows that.
|
Hey guys, I've been meaning to post this up for a while I just kept forgetting. A few years ago when I was in university I did this for one of my programming subjects.
While I know a lot more now than I used to and would change a lot, I'm hoping it would be a lot of help to people new to OOP. I called it an academic journal, but its more of a personal journal for academia.
PDF http://www.netgore.com/sites/default/files/ObjectOrientedProgramming.pdf
Thread http://www.netgore.com/forums/post/object-oriented-programming.html
I haven't made any revisions since as I will be creating a blog instead in the future of what I now know, I figure it would be much more useful that way.
Let me know what you guys think. I will appreciate any views on my piece, and will try my hardest not to let my ego get in the way, it was years ago so hopefully I can remain completely objective because I no longer have any real attachment to this document and there is a lot of stuff I would change now. 
Note that it says for Netgore only, don't worry about that. I just simply can't be bothered finding it, re-uploading it and instead just send this to everyone.
This is also not just a plug to Netgore, although please do check it out if you do use C#. Spodi would probably appreciate any support he can get.
|
EDIT: Sorry for the bump, nvm, I'm an idiot.
|
I am almost done with Sam's Teach Yourself Visual Basic in 24 hours and I need to learn Visual C++ .NET. I liked the format of the 24 hours series but they don't seem to offer any recent VC++ .Net books. Does anyone have a recommendation?
|
Hyrule18979 Posts
burn Sam's Teach Yourself Visual Basic in 24 hours
|
Kentor
United States5784 Posts
Metaprogramming Ruby. That book is so good. You gotta read it to bring your ruby skills to a new level.
|
On March 24 2012 16:04 tofucake wrote: burn Sam's Teach Yourself Visual Basic in 24 hours Why the hate bro?
|
On March 25 2012 10:26 scaban84 wrote:Show nested quote +On March 24 2012 16:04 tofucake wrote: burn Sam's Teach Yourself Visual Basic in 24 hours Why the hate bro? probably because the idea that you could learn an entire language well enough to use in only 24 hours is ridiculous.
That, or he meant that you should burn it to a CD :D
|
On March 26 2012 09:20 Millitron wrote:Show nested quote +On March 25 2012 10:26 scaban84 wrote:On March 24 2012 16:04 tofucake wrote: burn Sam's Teach Yourself Visual Basic in 24 hours Why the hate bro? probably because the idea that you could learn an entire language well enough to use in only 24 hours is ridiculous. That, or he meant that you should burn it to a CD :D
I lol'd
tbh I started learning programming with VB6 when i was 9 till about 16.
In that time period I might have learned about 1% of what I know about programming today, and I'm 22.
On March 24 2012 16:52 Kentor wrote: Metaprogramming Ruby. That book is so good. You gotta read it to bring your ruby skills to a new level.
I do a lot of meta programming in Ruby but I never bothered with the book. I'm interested now.
|
On March 26 2012 09:20 Millitron wrote:Show nested quote +On March 25 2012 10:26 scaban84 wrote:On March 24 2012 16:04 tofucake wrote: burn Sam's Teach Yourself Visual Basic in 24 hours Why the hate bro? probably because the idea that you could learn an entire language well enough to use in only 24 hours is ridiculous. That, or he meant that you should burn it to a CD :D Doesn't that sort of depend on the audience?
After you learn half a dozen languages, learning new languages starts to become easy. You start looking for the familiar things: how do you loop, how do you branch, how do you create function points, etc. The only thing you really need to "learn" are the quirks of the language; such as pipelining in ruby, or prototypical inheritance in js, or monads in haskell
|
I'm looking for suggestions in how to do this as user-friendly as possible:
Basically it's about customer and product registration. There's well above 1k customers and about 500 different products. Everything has been imported and setup in MySQL already so that bit is done. Now the thing is that when they get a new order (they basically only trade with other companies) so the registration is done manually. Now, when they want to register an order for a customer they have to go through a list with over 1k different names and ids, and for the product tied to that customer and order over 500 different names and ids. That just seems very annoying. So I'm looking for suggestions in how to approach this and make it more user-friendly.
Some ideas: - Using a huge listbox with say 50 rows will clutter up the screen a lot. (especially considering I need two of them if so --) - Just letting them enter the customer ID and product ID to fetch the required information and having the list on paper -- I like that one because it makes the job easy for me but on the other hand whenever they need to add a new customer or product to the database they will have to print out a new list... - Using AJAX to make some kind of neat live search function with suggestions, which seems to be the best approach out of them all, but I'm really new to programming and this seems to be the hardest way.
The purpose of this "site" is to produce invoices.
I use PHP/HTML/JS/MySQL etcblaetc to program everything.
|
Depends on how many orders you have If you have say 1 per day, you can do with option 2. But for user friendliness I'd go for option 3, even though it is more difficult for you.
|
On March 26 2012 18:30 qoiN wrote: I'm looking for suggestions in how to do this as user-friendly as possible:
Basically it's about customer and product registration. There's well above 1k customers and about 500 different products. Everything has been imported and setup in MySQL already so that bit is done. Now the thing is that when they get a new order (they basically only trade with other companies) so the registration is done manually. Now, when they want to register an order for a customer they have to go through a list with over 1k different names and ids, and for the product tied to that customer and order over 500 different names and ids. That just seems very annoying. So I'm looking for suggestions in how to approach this and make it more user-friendly.
Some ideas: - Using a huge listbox with say 50 rows will clutter up the screen a lot. (especially considering I need two of them if so --) - Just letting them enter the customer ID and product ID to fetch the required information and having the list on paper -- I like that one because it makes the job easy for me but on the other hand whenever they need to add a new customer or product to the database they will have to print out a new list... - Using AJAX to make some kind of neat live search function with suggestions, which seems to be the best approach out of them all, but I'm really new to programming and this seems to be the hardest way.
The purpose of this "site" is to produce invoices.
I use PHP/HTML/JS/MySQL etcblaetc to program everything.
I vote a combination of 2 and 3 just because if you run out of time you can still deliver, where as if you go down the route of 3 first and you run out of time you might be left with nothing.
Figure out how it would ultimately work in 3, the look the feel. Then, add one extra piece, the search button. Make it show the results as you want. Now, if you get done with it and still have time left, all you have to do is add in the JS to make the rest of it work.
Edit: I know your ultimate goal is user friendliness, but I guess I've been in the work world too long. Always want to have something to deliver.
|
Hey guys, I'm a pretty noob cs guy (2nd year of B.S) but I was wondering what you guys thought of this list of what every cs major should know. It pretty comprehensive and something I'd like to refer to from time to time as a kind of checkoff list of things to learn.
|
On March 27 2012 10:27 teamamerica wrote:Hey guys, I'm a pretty noob cs guy (2nd year of B.S) but I was wondering what you guys thought of this list of what every cs major should know. It pretty comprehensive and something I'd like to refer to from time to time as a kind of checkoff list of things to learn.
If you know all of those things I doubt there is a company in the world that wouldn't hire you. We ask the people we are trying to hire to have about 1/4 of those requirements and still can't find them.
I personally think the list is much, much shorter but a little more all ecompassing. These are in no particular order after the first one.
* Work in an area that you are passionate about. The more you care about what you are doing, the more involved you will be and invested in your projects. Caring can take you very far in your career. If you like web, go web. If you want to be a game programmer, then do that. I don't think I can stress this one enough. It doesn't matter if you are the smartest guy in the world, if you don't give a shit about what you do you aren't going to be as effective as you could be.
* Learn how to communicate! I don't know if its all the typical nerdy stereotypes, but if you can talk to customers and gather requirements that is a huge plus.
* Figure out how to pay attention to detail. The small things matter in programming. The better you are at noticing difference that other people do not see immediately, the quicker you will be able to solve a lot of problems. I can't tell you the number of bugs that I've fixed in production systems that were there because of capitalization errors in typing.
* Figure out how you learn and then do everything you can to put yourself in a position where you can use those techniques. Learning quickly is important, especially if you are in an environment where things change often.
|
Hallo guys, algorithm question!
Let's say I have a list of 2-dimensional points (such as [(0,0),(0,1),(1,0),...]) in any random order. What I want to accomplish is to sort the points by pairs, based on the proximity of 2 points in the list, in ascending order. If the list has an odd number of elements, that means the last element will have no leftover pairs to pair up with. You may assume that there are no negative numbers taken into account.
So for example, a list containing (0,0),(3,3),(1,1),(3,2) will sort itself into (3,2),(3,3),(0,0),(1,1).
I currently have a really really ugly and inefficient solution so if there's a way to cut this down to <=O(n^2) efficiency that would be good. 1:30AM is not the most productive time to be coming up with stuff like this lol.
The context of this algorithm is that I am implementing bounding volume hierarchies and I'm trying to construct it dynamically by generating a balanced binary tree.
|
On March 27 2012 10:00 berated- wrote:Show nested quote +On March 26 2012 18:30 qoiN wrote: I'm looking for suggestions in how to do this as user-friendly as possible:
Basically it's about customer and product registration. There's well above 1k customers and about 500 different products. Everything has been imported and setup in MySQL already so that bit is done. Now the thing is that when they get a new order (they basically only trade with other companies) so the registration is done manually. Now, when they want to register an order for a customer they have to go through a list with over 1k different names and ids, and for the product tied to that customer and order over 500 different names and ids. That just seems very annoying. So I'm looking for suggestions in how to approach this and make it more user-friendly.
Some ideas: - Using a huge listbox with say 50 rows will clutter up the screen a lot. (especially considering I need two of them if so --) - Just letting them enter the customer ID and product ID to fetch the required information and having the list on paper -- I like that one because it makes the job easy for me but on the other hand whenever they need to add a new customer or product to the database they will have to print out a new list... - Using AJAX to make some kind of neat live search function with suggestions, which seems to be the best approach out of them all, but I'm really new to programming and this seems to be the hardest way.
The purpose of this "site" is to produce invoices.
I use PHP/HTML/JS/MySQL etcblaetc to program everything.
I vote a combination of 2 and 3 just because if you run out of time you can still deliver, where as if you go down the route of 3 first and you run out of time you might be left with nothing. Figure out how it would ultimately work in 3, the look the feel. Then, add one extra piece, the search button. Make it show the results as you want. Now, if you get done with it and still have time left, all you have to do is add in the JS to make the rest of it work. Edit: I know your ultimate goal is user friendliness, but I guess I've been in the work world too long. Always want to have something to deliver.
Good points. I agree with you both! I'll just go for option 2 right now and educate them thoroughly in how to do everything. See how it works out.
|
On March 27 2012 14:52 ThatGuy wrote: Hallo guys, algorithm question!
Let's say I have a list of 2-dimensional points (such as [(0,0),(0,1),(1,0),...]) in any random order. What I want to accomplish is to sort the points by pairs, based on the proximity of 2 points in the list, in ascending order. If the list has an odd number of elements, that means the last element will have no leftover pairs to pair up with. You may assume that there are no negative numbers taken into account.
So for example, a list containing (0,0),(3,3),(1,1),(3,2) will sort itself into (3,2),(3,3),(0,0),(1,1).
I currently have a really really ugly and inefficient solution so if there's a way to cut this down to <=O(n^2) efficiency that would be good. 1:30AM is not the most productive time to be coming up with stuff like this lol.
The context of this algorithm is that I am implementing bounding volume hierarchies and I'm trying to construct it dynamically by generating a balanced binary tree. i don't think you can solve this exactly in O(n^2) or less. The solution you need sounds like computing all distances pairwise O(n^2) (so getting any lower is impossible anyways i think) and then running something like this: http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/papers/BLOSSOM5.html (a variation of edmons algorithm (maximal matchings)) for finding cost minimal maximal matchings. What you are looking for is called a cost minimal near perfect matching i believe (near perfect matchings are maximal). juding from having a quick look at the paper, it runs in about O(n^3 * m)
the one thing you've got going for you is that your graph is fully connected though. So maybe there is room for improvement. But even the Hungarian algorithm, which finds a cost minimal perfect matching on a fully connected bipartite graph, runs in O(n^3). and you can't offer a bipartite graph, so you probably will have to live with something slower.
|
Yeah the solution I currently came up with is O(n/2 * n^2), but I usually don't deal with stuff that goes beyond O(n^2), so I wasn't sure if I was being stupid. Thanks for the reply. On the plus side, once it's constructed I don't really have to deal with it again lol.
EDIT: Actually it looks a bit less than that, since it keep looping through a smaller list on every iteration...w/e.
|
Kentor
United States5784 Posts
On March 27 2012 14:52 ThatGuy wrote: Hallo guys, algorithm question!
Let's say I have a list of 2-dimensional points (such as [(0,0),(0,1),(1,0),...]) in any random order. What I want to accomplish is to sort the points by pairs, based on the proximity of 2 points in the list, in ascending order. If the list has an odd number of elements, that means the last element will have no leftover pairs to pair up with. You may assume that there are no negative numbers taken into account.
So for example, a list containing (0,0),(3,3),(1,1),(3,2) will sort itself into (3,2),(3,3),(0,0),(1,1).
I currently have a really really ugly and inefficient solution so if there's a way to cut this down to <=O(n^2) efficiency that would be good. 1:30AM is not the most productive time to be coming up with stuff like this lol.
The context of this algorithm is that I am implementing bounding volume hierarchies and I'm trying to construct it dynamically by generating a balanced binary tree. I'm not sure if this applies but take a look at quad trees or cell lists.
|
|
|
|