Can anyone name some general advice or tips, like should i already start with learning programming? (ive had C, and ive also worked with microprocessors)
The Big Programming Thread - Page 258
| Forum Index > General Forum |
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. | ||
|
Garfailed
Netherlands409 Posts
Can anyone name some general advice or tips, like should i already start with learning programming? (ive had C, and ive also worked with microprocessors) | ||
|
Arnstein
Norway3381 Posts
| ||
|
netherh
United Kingdom333 Posts
On February 28 2013 19:43 AmericanUmlaut wrote: If you're going to start from the assumption that your map is a 2-dimensional grid, and all your player has are x and y values, then you can still get a reasonable separation of responsibilities. Your parser is responsible for understanding that "go south" means "attempt to increase the Y coordinate of the player's position by 1". The parser asks the map if that's allowed, the map says yes, the parser tells the player to move to the new coordinates. So the player is responsible for knowing where it is, the map is responsible for knowing what coordinates are legal, and the parser is responsible for determining the meaning of incoming user input. I'm not really convinced by this. I feel like the command parser will end up having to know about literally everything, when really it should just be something that parses text and verifies whether that command is ok. I think possibly a sort of signals approach would work better. The parser looks at the command, and recognises what it is, and that it's a valid command (a movement command "go" and direction "south"). It then announces the command using the relevant signal. When you create whatever object you use for moving the player, you pass it the relevant movement signal, to which it then subscribes. As far as world / map / rooms / player, I'm not sure that any of them should actually be doing movement. I think it might be worth putting it in a different subsystem that handles all entity movement itself. If you wanted to put in AI monsters that can move around as well, it doesn't seem like a good idea to tie movement to the player, and you don't really want the world moving stuff around. So maybe have a separate system for movement that listens to move commands, and queries the map for whether that entity can move in the direction specified, then handles changing the player / map etc. | ||
|
Tobberoth
Sweden6375 Posts
On February 28 2013 19:59 Garfailed wrote: Im probably going to drop out of my engineering class, and very interested in programming. Can anyone name some general advice or tips, like should i already start with learning programming? (ive had C, and ive also worked with microprocessors) If you know C and worked with microprocessors, you probably already have the knowledge needed to go for pretty much whatever you're interested in. If you're interested in making business applications, web applications etc, you'll probably want to learn C# and Asp.net, if you're interested in sticking to technical things such as drivers, embedded devices etc, sticking with C and learning C++ would be beneficial. If you know C, you already know the basics of programming, so it's really up to what language you want to be using or what area you plan to work in. | ||
|
Garfailed
Netherlands409 Posts
On February 28 2013 20:06 Arnstein wrote: Why are you dropping out? Just curious! I now do 'mechatronics' which is a mixture of mechanical engineering, electrical engineering, and programming. The mechanical part is rock hard, and not at all fun for me... I like programming though ![]() On February 28 2013 20:30 Tobberoth wrote: If you know C and worked with microprocessors, you probably already have the knowledge needed to go for pretty much whatever you're interested in. If you're interested in making business applications, web applications etc, you'll probably want to learn C# and Asp.net, if you're interested in sticking to technical things such as drivers, embedded devices etc, sticking with C and learning C++ would be beneficial. If you know C, you already know the basics of programming, so it's really up to what language you want to be using or what area you plan to work in. Yea, i'll look around a bit on what looks interesting, and what languages are used in what area. I think i'll start with java or C++ to get back into things. | ||
|
FFW_Rude
France10201 Posts
Hope my question falls into it nicely because it's not really programming... So i just passed from mysql to postgresql and there is something that i don't really get. I have all of the "intranet" (at work) on mysql in different database (basicly i have a database with the intranet and i have a database for each of the application that are inside the intranet). But i was wondering on postgresql if it was better to do a BIG database with schemas ? For exemple a database "intranet" with schemas like "application1","application2" etc... instead of having 3databases labelled intranet,application1,application2 Don't know if it's really understandable and sorry for the bad english ![]() | ||
|
Prugelhugel
Austria637 Posts
Has anyone some good advice where to get started? I'm currently trying to create my first Hello World app and I've already read a bit on the official Android SDK Developers site And yes, I have (more or less fundamental) Java/Programming knowledge but I am learning this stuff quite fast. Would really appreciate it, if someone could point me towards some nice youtube tutorials or online guides. ♥ In addition: If someone with more SDK experience has the time to rate the amount of effort of my project as I'm planning it: + Show Spoiler + My project (It's not a game, it's business related but I won't bother you with the details ):The main part (I don't know yet about a data storage system) would be one blank screen where you can: create rectangles (The screen is divided into them, you start with one and can add an "unlimited" amount) into these rectangles you can put bubbles which you can inflate or deflate The total size of all bubbles per rectangle gets counted and the rectangle with the most bubble mass gets highlighted. In addition, you can name all of these bubbles and rectangles, whereas the bubble name only shows up if it is selected. Little drawing of my idea: ![]() | ||
|
Tobberoth
Sweden6375 Posts
On February 28 2013 23:22 FFW_Rude wrote: Hi, First time in this thread. Hope my question falls into it nicely because it's not really programming... So i just passed from mysql to postgresql and there is something that i don't really get. I have all of the "intranet" (at work) on mysql in different database (basicly i have a database with the intranet and i have a database for each of the application that are inside the intranet). But i was wondering on postgresql if it was better to do a BIG database with schemas ? For exemple a database "intranet" with schemas like "application1","application2" etc... instead of having 3databases labelled intranet,application1,application2 Don't know if it's really understandable and sorry for the bad english ![]() I guess it depends on how interconnected those schemas are. If Application 1 and Application 2 really don't have all that much in common (such as users) or don't use each others data too often, it makes sense to me to have different databases, since that simplifies backups, restores, and even stuff like maybe needing different collations. Hell, you might want to split the applications up to different servers later, which will be hard if both applications are part of one big database. Isn't it more common to use schemas to "group" several individual databases anyway? | ||
|
Ilintar
Poland794 Posts
On February 28 2013 03:32 Tobberoth wrote: This is a more theoretical and simple question, but I'd love some input, it's something I've been pondering since I learned OOP principles ages ago. Let's say I'm making a console-based adventure game. I have a world class which handles command inputs from the user. The world class has a map (2d array of room objects), a player object and obviously lots of other stuff. Now let's say the user inputs the command "south". Thinking object-oriented, I go "Ok, so I want my player object to do a move method". At first, this makes sense because the player has a struct with an X and a Y position. However, obviously I need to make sure that the player doesn't walk outside of the map. The conundrum is, the player object doesn't know about the map, which the world object has. The are two solutions I can think of, and I sort of dislike both: 1. Let the player know about the map, by sending in a pointer to it in the players constructor. Now, the player can check for himself if there's a room at the end of the Go command, else return that movement was impossible. Problem of course being the stronger coupling between the player class and the world class. 2. Don't let the player move, let the world have a MovePlayer method which does the map-checking etc and then updates the player objects position. Now the player is completely uncoupled from the world, but following this logic, the World class will become a BEAST which will have to implement pretty much everything done in the game. To use an OOP term, the cohesion for the world class will become very low if it has to handle every other object in the game. How do you guys feel situations like this are best solved? It seems like it's impossible to hold to strict object-oriented guidelines without making pretty much every class know about every other class. If you want to take the example farther, let's say you have so many commands that you want some form of command-parser class... now, should suddenly the command-parser be coupled to all the other objects it needs to handle when dealing with commands? There is a standard design pattern within the OOP world to handle exactly this type of functionality - events. Events are a way for the object-oriented paradigm to handle non-locality. The problem is exactly as you mentioned: you have local objects that want to possibly update other objects via some sort of common interface, but it's against the OOP paradigm to have objects know about every other interconnected object out there, because separation is a key part of the paradigm. The solution is to have a Controller object that specifically registers events. Events are objects that basically say "something happened". Then, one has event handlers. Event handlers are basically special function-like objects (delegates - another nice and useful design pattern) that basically take an event and do something with it. Event handlers are registered - objects let the Controller know that they would like to respond to things of type X (in your case, MovePlayer). Therefore, instead of a direct communication: * player moves, updates state locally * player messages all relevant entities that it moved you have indirect communication: * at initialization, the Map object registers a handler for PlayerMove events * player moves, signals a PlayerMove event * controller polls all handlers it has registered, seeing if any of them handles PlayerMove events * the Map object's registered handler says "yes, I want to do something about the PlayerMove event" The nice thing about events are that they live within the OOP world - for example, you can have an event type hierarchy. Say you have PlayerMove events, but you also have MonsterMove events - both of those might be a instances of the ActorMove event class (which might be handled, say, by the collision detection engine, who doesn't care if the Actor is a Player or a Monster). There are also subtleties about events (for example, the event calling queue - you can have handlers that override or cancel out other handlers, or modify their calling parameters, you can have events that themselves generate new events and so on), but there's a ton of literature out there on the topic, so you just have to read it :> | ||
|
RoyGBiv_13
United States1275 Posts
On February 28 2013 21:11 Garfailed wrote: I now do 'mechatronics' which is a mixture of mechanical engineering, electrical engineering, and programming. The mechanical part is rock hard, and not at all fun for me... I like programming though ![]() Yea, i'll look around a bit on what looks interesting, and what languages are used in what area. I think i'll start with java or C++ to get back into things. Stick with it if you can! That engineering mindset is definitely useful for programming down the line. Mechanical stuff seems boring compared to the depth of programming, but its a really useful skill set that most programmers don't have, which makes you just that much more interesting. Also, working with microprocessors is the best programming challenge there is, so there's no doubt you fell in love ^_^. Understanding a computer at the low level is an incredible feeling whenever you get it to do something, even simple, using this knowledge. I went to school for an electrical engineering degree, and my first jobs were pure programming. The EE degree definitely pulled more than its weight when compared to other CS candidates, since I understood parts of the system that others had little base understanding. If you stick with your engineering degree, you won't regret it. Then again, as long as you try hard enough, anything is possible. If you suddenly want to take on high-level software engineering and start designing corporate or web apps, then go for that instead of microprocessors. The only way you'll know what you want is to try a wide variety of things. Worst thing is that you find you don't like doing high level programming, and learning that is just as valuable as the inverse =P. | ||
|
obesechicken13
United States10467 Posts
On the other I'm kind of interested in entrepreneurship/more web design. I'm considering a wireless communication course but have no idea what it is and am worried I'll hate it, and since I'm on probation, it's hard to change courses. Possible. but hard. I might even like it. But without the course I can't see any telecomm companies hiring me after graduation. Is it alright to be that engineer that computer engineer that knows a bit about stuff but hasn't fully specialized in an area? What did you do as an undergrad when picking courses? | ||
|
Savi[wOk]
United States81 Posts
| ||
|
tofucake
Hyrule19174 Posts
| ||
|
obesechicken13
United States10467 Posts
On March 01 2013 09:22 Savi[wOk] wrote: I was wondering if the programming language "Ruby", was a good language to learn for a beginner even If I don't plan on looking at rails. I had difficulty with ruby and I'm not a beginner beginner. It takes a while to get into but I do recommend a interpreted language that gets rid of memory leaks and is easy to use. I expected to learn Ruby quickly but after a full day or two I still know nothing about it. There are so many guides on ruby too. R is a decent language I feel, but you should do a language that you'll need to do for work or for school. Spending 1000 hours on Ruby because you have to or because it fulfills your needs is better than spending 10 hours on R. Hell HTML isn't even considered by many to be a language but it's a good place for people to get their feet wet. | ||
|
RoyGBiv_13
United States1275 Posts
On March 01 2013 09:22 obesechicken13 wrote: When you were in undergrad and you saw a course that you had no idea about but you thought might be important to getting a specialization, what did you do? On the one hand I am kind of worried about not having a specialization. On the other I'm kind of interested in entrepreneurship/more web design. I'm considering a wireless communication course but have no idea what it is and am worried I'll hate it, and since I'm on probation, it's hard to change courses. Possible. but hard. I might even like it. But without the course I can't see any telecomm companies hiring me after graduation. Is it alright to be that engineer that computer engineer that knows a bit about stuff but hasn't fully specialized in an area? What did you do as an undergrad when picking courses? Take courses that are challenging and interesting! Forget who will hire you and what the subjects actually teach you. Most of the important stuff you learn is actually just the process of note-taking and studying necessary to learn on the job. Also, I highly recommend taking all communications courses available. Think about how far advanced the communications field is compared to much of the other technology fields. We can talk to satellites hurling through space at high enough bandwidths to transmit video. We can support thousands of people streaming high bandwidth applications on phones with radios that fit in your palm in a small area. All of this is possible because at every layer of the communication stack there is incredible innovations that allow for incredibly complex interactions to happen. Sorry for the starry-eyed rant *_* EDIT: you should have a strong understanding of signals before engaging in a communications course, as there likely will be some error-correcting code and phase keying subjects that may just stump you. | ||
|
Blisse
Canada3710 Posts
On March 01 2013 09:35 RoyGBiv_13 wrote: Take courses that are challenging and interesting! Forget who will hire you and what the subjects actually teach you. Most of the important stuff you learn is actually just the process of note-taking and studying necessary to learn on the job. Also, I highly recommend taking all communications courses available. Think about how far advanced the communications field is compared to much of the other technology fields. We can talk to satellites hurling through space at high enough bandwidths to transmit video. We can support thousands of people streaming high bandwidth applications on phones with radios that fit in your palm in a small area. All of this is possible because at every layer of the communication stack there is incredible innovations that allow for incredibly complex interactions to happen. Sorry for the starry-eyed rant *_* EDIT: you should have a strong understanding of signals before engaging in a communications course, as there likely will be some error-correcting code and phase keying subjects that may just stump you. You have swayed me to take a comms course later on in my studies. :3 Edit: Anddd that edit ruined that dream. | ||
|
obesechicken13
United States10467 Posts
On March 01 2013 12:09 Blisse wrote: You have swayed me to take a comms course later on in my studies. :3 Edit: Anddd that edit ruined that dream. Yeah... that edit. | ||
|
CecilSunkure
United States2829 Posts
![]() | ||
|
endy
Switzerland8970 Posts
I got a Java project in netbeans. One package, two classes in that package, 3 library jars, and one properties file. I want to build a jar file that I can execute from command line. I want the .jar file to contain only my classes in their package and the manifest file. I want to keep the 3 library jars outside of my jar as well as the properties file. When I run the project with Netbeans it runs fine. But every time I try to run my jar outside of Netbeans my program is unable to read the properties file. I made it work by including the properties file inside the jar but it's stupid because the purpose of the properties file is to have an easy to edit properties. | ||
|
phar
United States1080 Posts
On March 01 2013 13:02 CecilSunkure wrote: Signals? Man that stuff isn't too hard. Just flex your C++ skills and write some interesting communication routines. At least I imagine things regarding satellite communications will be highly optimized in C or C++. Don't be scared or lazy ![]() The physics/eng side of comm is hard as fuck. If you don't have a firm grasp of at least basic fourier and laplace transforms you're gonna get creamed. Really depends on the course though, "wireless communications" is not a very descriptive title and could be anything from a ridiculously easy tech-school-style intro class to who knows what. | ||
| ||


):![[image loading]](http://oi49.tinypic.com/hwxvkk.jpg)