Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Sean T. McBeth

Member Since 11 Sep 2000
Offline Last Active Jun 18 2015 08:32 AM

#5235120 Engineering vs Programming?

Posted by Sean T. McBeth on 16 June 2015 - 08:27 AM

There is a general problem in the US right now that the average salary for middle-class workers is not keeping pace with the cost of living in those places where jobs are available. Your first job out of college, you're probably going to struggle to make ends meet, because many of the tech jobs have moved to expensive cities and they aren't going to pay you well to start.

 

I've had more hands-on, away-from-the-computer work as a programmer who isn't afraid of soldering irons than most of my electrical engineer friends who view programming as just a necessary evil.

 

Bachelor's degree is mostly a waste of money. Get one as cheaply as possible, don't go to an expensive school, try not to pay for it yourself, don't go into massive amounts of debt. Unless you're going to end up working for NASA, nobody cares if you went to MIT. The vast majority of employers only care that you *have* a degree at all, not where it was from or what your GPA was. Master's degree is a complete waste of money. If you want to do research, go get into a PhD program. Master's degree program is just to let people who are afraid of learning on their own or afraid of committing to a PhD program to dump more money into the system.

 

Best way to make money is freelancing. Fully 1/3rd of the US economy is now freelance, and it's growing. No companies are increasing the number of full-time employees they are hiring, established companies are dumping everything off on outsourced work. Might as well set your own terms. Market yourself, stay on top of your skills, learn more about business than just programming (which no university is going to teach you). You're never going to be paid what you're worth at a job, and the vast majority of employers you're going to end up finding will treat you more like a burden than the source of their livelihood.

 

I socialize a lot, just not with my "coworkers", because I don't have any coworkers. I work out of a freelancer's' space, the monthly dues are less than what I was spending at coffee shops, plus it still comes with coffee, the wifi is better, and nobody is bringing in their screaming kids in strollers. I also attend meetups of various types in my area. So, I get to meet a lot of different types of people, not just programmers.

 

I'm also going to buck the trend in this thread and say forget everything about any concept called "Passion In Your Work". It's nice when you're working on something that you enjoy, and I recommend it to the fullest extent that it is possible, but the way it is pitched makes it sound like a never-ending honeymoon at work. It ignores the fact that there is a heaping helping of work that *must* be done that you will *never* be passionate about. You *have* to understand how taxes work. You *must* make sure your health is taken care of.  If you work independently, you *are absolutely required* to advertise and market yourself, network with others, and pitch services to people. The specific details aren't important, you certainly like and dislike a completely different cross-section of things than me. There are times when even the core work that you love will become a chore, but it still has to be done! Everyone has to get this notion that "passion in my work = success" out of your head. I think it is more dangerous than it's worth.

 

Scratch everything else I said, except for "stay out of debt". If you can manage to stay out of debt, you can do whatever you want. It doesn't really matter. Stay out of debt and you could work 10 hours a week writing stupidly simple web code and you'd be able to support yourself perfectly well. Add another 10 hours a week and you could support a small family. 20 hours a week of work is not a lot, I fit it into 2 days, then do whatever the hell I want the rest of the time. But you *have* to stay out of debt. It doesn't work otherwise.




#5197356 I understand the language... I just have trouble implementing it into a game...

Posted by Sean T. McBeth on 10 December 2014 - 06:25 AM

There is no reason you couldn't use Python to make games.

 

The problem you're facing is that learning to program is a lot more than just learning syntax. You have to learn how to use the libraries of your environment, you have to learn how to use the building and packaging and editing tools available to you, and you have to learn how to solve problems. All at the same time.

 

When I start learning a new programming language (about a quarterly occurrence for me, these days), I start by figuring out how to:

  1. Open a GUI window, bonus points for it being a native window for the operating system I'm on
  2. Put buttons in the window, and how to place them. The GUI button is the minimum of interaction that a GUI system can provide. If I can get a button working, I'm well on my way to figuring out how the event model works. It will also serve me when developing the program further, to have an easy way to plop controls on the screen to change things.
  3. Register mouse and keyboard events. Ideally, I want to be able to poll the keyboard and mouse, but that is often not the case, so usually I have to setup an event handler of some kind and keep track of the state.
  4. Perform an animation loop, the "infinite while loop" that also doesn't make the system unresponsive. In the old days with Win32, that meant an infinite loop which gave back time to the OS to execute. In Java, that meant a Timer object that had a Tick event handler. In JavaScript, you request a new frame of animation from the browser when you first start or after you receive an animation frame from the browser. So how a particular system does animation can be quite varied.
  5. Load files from disk. I'm going to want to store my images in files, foremost, and eventually my level layouts.
  6. Draw images to the screen. With the basic 2D graphics libraries that are available in most GUI subsystems, this is not too difficult. In all of the 3D APIs, there is a lot of setup code to get something like this to work. I usually focus on the 2D graphics from the GUI subsystem first, because usually that's all I need to start.
  7. Play sounds asynchronously. Audio has a huge impact on the enjoyability of a game. A really crappy looking game can be greatly improved by just some simple sounds, but even a great looking game is nearly ruined by having no audio. Depending on the system, making it so you can play multiple sounds at the same time, on top of each other, can be difficult. But once I've got it, it's usually easy to copy it around to all of my projects.

Once I have these tasks figured out, the rest of the job is mostly just figuring out how to put together the game. For a "first" project in a new language, I usually do Tetris for this reason, because I've done it so many times I don't have to think too hard about what needs to be done to make the game work.




#5197271 Android Game development

Posted by Sean T. McBeth on 09 December 2014 - 04:20 PM

Just, you know, use whatever works for you. You're not going to make Skyrim on your own (wait, I haven't been playing a lot of AAA games lately, what's the current example?) Your biggest project hurdle will not be the performance of your programming language, it will be the likelihood that you'll actually complete the project.

 

So don't make it hard on yourself. Use Python, or Haxe, or Unity3D with JavaScript scripting, or whatever you think you're most comfortable with. Will it be "OMG ZOMG BESTEST GRAFEX EVAR!"? Nope. Will it matter? Equally nopers on the nosers.

 

As you grow as a programmer, you'll find you have needs that your current programming language doesn't fulfill. And that's any language. And you'll find it ebbs and flows over time, like today C# is the best language for you, tomorrow it's Ruby, next year it's C# again. Don't sweat it. Just go with it. In 5 years, you'll know 10 languages. In 10, you'll even be good at one or two of them. In 20, you'll forget which languages you even know and they will all start to blur together as you slip in and out of each like carving sick moguls on a ski slope. Or something. My metaphors aren't good today.

 

Super Mario Bros 3 was a high water mark for me in gaming. Haven't played many platformers since then that have even come close. Maybe Super Meat Boy, but then again, maybe not. That ran on a 1MHz, 8-bit MOS 6805 processor. Today, you have probably 2 to 4 processors in your phone that are each easily 2000 times faster. That's a lot of times-faster in which to fit high-level language overhead. Nowhere near all of that is attributable to "hand-written ASM". We've got optimizing compilers these days. You can't write ASM as fast as your compiler can make code.

 

All I'm saying is, if your game sucks, if it's slow, if it isn't fun, it ain't because of the programming language. Take it from someone with a lot of unfinished projects: don't waste your time on this meaningless stuff about what programming language to use, and don't waste your time with these people who will call you an idiot for your choices. Learn good habits, one of which being how to finish projects. Sounds like you're off to a good start.




#5193861 Want to get the barebones of a Trading Card Game running but need some help i...

Posted by Sean T. McBeth on 20 November 2014 - 02:58 PM


Hello everyone. I am currently making a trading card game based on the DC comics universe.

 

If you take this any further than your own table DC Comics will serve you with a Cease & Desist order.

 

Why not spend just as much effort making the game on characters of your own design and then you won't be in a position to have your efforts wasted by lawyers? If you don't think you can make up your own characters, there are several characters in the public domain at your disposal. For example, this seems like something that would map very well to the Greek or Norse mythologies.




#5191619 what technology to use: Android 2D game

Posted by Sean T. McBeth on 06 November 2014 - 11:24 PM

pix or it didnt happen




#5191323 Build/design a mobile app using HTML5/Javascript?

Posted by Sean T. McBeth on 05 November 2014 - 07:49 AM

I'm generally a contrarian guy.

 

I have zero interest in incurring app store selling fees or being at the mercy of their random-at-best-bribed-at-worst featuring lists.

 

Everything else you mention can be done in the browser already. I can bookmark an SPA and have my own icon on the smartphone's launcher screen. I can design whatever touch interactions I want. I can run in offline mode. I can build around screens instead of scrolling. And I have access to a plethora of APIs, yes, including the camera. All without a wrapper.

 

I can even do virtual reality.

 

The app store isn't going to help you sell units. It's going to help you feel like you've done "enough" to sell your app and then you're going to languish at 2 sales a week for the next 5 years. If, then, marketing and advertising my app is already on me, then why put up with the Apple or Google taking a 30% cut? What, exactly, did they provide for a larger chunk than the US government charges me? At least I get roads out of that deal. At least I get... no, sorry, roads is all I'm coming up with.




#5188426 How to remove GET variables from URL in php

Posted by Sean T. McBeth on 21 October 2014 - 06:48 PM

Well, all the GET parameters can be "hidden" if you used an Ajax query. Everything will be sent to the server, the user just won't see it in the URL of their browser.

 

GET is usually used when you want the URL to be unique, e.g. for printing coupons, etc. I don't remember ever having a problem with POST, either.

 

Just look up XMLHttpRequest, and the libraries that make it easier (jQuery was the framework of choice a few years ago, I have no idea if Angular does AJAX too, as I haven't done Web programming for an year to two).

 

It's a little better to think of GET as "a request that changes nothing" and POST as "a request that changes things". A different GET requests at different times of day to different or the same URLs on the server may return different results, but only because of some other, outside influence. The previous GET requests cannot be the reasons why the future ones are different, i.e. GET is read-only. There are other HTTP verbs, but they are mostly out of fashion/only useful for WebDAV (which is itself mostly out of fashion). 

 

So, submitting a form, almost always should be a POST, unless it's very clear that the form is selecting navigation elements. But then, forms mostly shouldn't be used as navigation elements.

 

To the OP, I urge you to please take the time to learn how to do the correct thing here. Don't hack in a solution. Start here: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol




#5187026 transforming a rectangle into a trapezoid

Posted by Sean T. McBeth on 14 October 2014 - 03:31 PM

Wow, you realize this thread is 10 years old?




#5135878 How to get good fast?

Posted by Sean T. McBeth on 02 March 2014 - 12:04 PM

"How do I get the work done?" By getting the work done. There is no better substitute for getting the work done than getting the work done. Finding the best chair, the best keyboard, the best text editor, the best caffeine vector, the best excuse this week for why you haven't gotten the work done, they all feel like getting the work done. But they aren't. You just have to get the work done.

 

Or, in the words of my father, standing over me as I procrastinated my homework, "Put the pencil, on the paper. Move your hand. Move your hand."




#5093272 Highest level of math needed for 2D game development?

Posted by Sean T. McBeth on 11 September 2013 - 08:06 AM

I consider a solid understanding of discrete math to be a necessary skill for any type of programming. If you don't agree, I submit you probably don't know discrete math very well. Learn it, and you'll be enlightened.

 

I've only just started delving into lambda calculus, but what I have learned so far has drastically improved my productivity and the quality of my code.

 

If you're interested in anything involving free motion, i.e. an Asteroids clone or an FPS, then trigonometry and linear algebra are important. A solid understanding of differential calculus can significantly enhance your understanding of many problems you might encounter with your update loop as well.




#5045318 Database change management

Posted by Sean T. McBeth on 21 March 2013 - 11:35 AM

I'm curious about how other people use and live with databases, specifically the types of tools they use around their database to simplify work with it. For background info, what database(s) do you use, and what is the scope of your project? What kind of tools do you use to manage change with your database (implicit or explicit schema, server deployments, etc.)? What kind of "generator" tools are you using (thick- or thin-ORM, data access layers, whatever)? What pain points do you still experience? Thanks!

 
For myself, I have worked on a lot of custom enterprise resource planning systems over the years. Data is generally small, and highly relational. It's been mostly SQL Server, but there is some MySQL in there too. In other words, all pretty basic RDBMSs. I've played around with ORM systems like NHibernate and Entity Framework, found them quite useful for designing the initial database, but lacking something in the long run for any time changes were necessary after a nontrivial amount of data had been recorded. As a result, I've tended to try to leave the database changing in the database realm and use only a thin ORM (direct table mapping) with classes automatically generated from the schema. This seems to avoid lost data problems, but comes at a high development cost for constantly repeating yourself and not having change management ala source control in place.
 
Redgate has a tool called SQL Compare that I've used in the past that makes diffing and merging databases a snap, but it is very expensive. Without a SQL Compare-like tool, it's really easy to miss changes to tables and stored procedures without extremely comprehensive testing (and really, who does that?) when deploying from a development- to testing- or production-environment. And still, that is a uni-direction move. Unlike source control, you never get to see the past again (unless you're restoring from backup, and that is just not automatic enough or simple enough to be a workable solution).



#5021812 Source Control - Perforce

Posted by Sean T. McBeth on 15 January 2013 - 09:11 AM

Client-server model SCMs are just a degenerate case of distributed SCMs; you can model a client-server SCM with a distributed one, but you can't model a distributed SCM with a client-server one. Also, Git's merge tool is killer, and without its powerful merge tool, branching (which is a vital operation in mature code bases) is just too difficult and dangerous to bother.

 

I remember thinking SVN was leagues away from VSS or CVS in quality. Now, I see them as more alike than different. All client-server SCMs are basically garbage, and Git is the gold standard of distributed SCMs.




#5018857 Programming progression

Posted by Sean T. McBeth on 07 January 2013 - 08:19 PM

There is a reason why I didn't recommend a specific language. It doesn't matter. Learn Prolog as your first language. Learn Fortran. Heck, learn Malebolge. Doesn't matter. 

 

What does matter is your incessant worrying about the "right" and "proper" and "correct" way to do things, which is going to do nothing but hurt you in the long run.




#5017841 Java images?

Posted by Sean T. McBeth on 05 January 2013 - 01:13 PM

drawImage returns immediately, whether the image is loaded or not. Check the return value of drawImage. If it's false, then the image has not yet loaded. Since you're reloading the image every time you paint, I suspect this is probably the case.

 

This may have more information for you




#5017837 Javascript / HTML5 best practices

Posted by Sean T. McBeth on 05 January 2013 - 01:02 PM

First and foremost, since JavaScript is a programming language, the same general rules apply to writing efficient code:

  • Use the best algorithm for the task. Example, don't spend hours optimizing your bubble sort procedure when a quicksort will always be faster.

  • Use the features provided by the language's standard library, because they're probably written better than anything you'll create. Example, don't write your own quicksort. The standard library sort probably already does it.

Since javascript is a dynamic language, most of the same rules apply when optimizing:

  • Function calls to JavaScript are expensive. Calls to built-in functions may or may not be.

  • Dictionary references are expensive. Example: dictionary['thing']. If you need to access the same element more than once in a loop, assign it to a local variable before the loop then reference it with the variable.

  • Consider dictionary.thing to be equivalent to dictionary['thing'] as far as performance is concerned.

  • Functions are first class objects, and being first class objects they are no different than any other element in a dictionary on your objects: This line: "myobject.function()" can be considered the equivalent of "myobject['function']()" as far as efficiency goes. You can hoist this outside the loop too: 
    var myobject = new MyObject(whatever);
    var hoisted = myobject.function;
    
    for (var i = 0; i < 1000; ++i) {
        for (var j = 0; j < 1000; ++j) {
            hoisted(i, j);
        }
    }

     

     


  • "for (var i = 0; i < arrayLength; ++i)" is more efficient than "for (var i in array)" or even "for (var i = 0; i < array.length; ++i)" when the dictionary can be indexed sequentially.

  • Use built-in functions whenever possible, because they're often implemented in a low level language and compiled to machine code.

  • jsPerf is a great resource.

  • Don't optimize until you've profiled.

  • What is fast in Chrome might be slow in Safari, Firefox or Internet Explorer.

 

This is all very good advice, with the exception of "quicksort is always faster than bubblesort". That isn't necessarily true. Bubblesort is very fast on nearly sorted data and quicksort has a large constant value to its runtime that makes some algorithms like insertionsort faster than it for small sets of data. It really, really depends on the situation, which I think was your more general point, assume nothing.

 

Really, really, assume nothing. There is so much out there that can go wrong or can change at the last minute or looks one way but is really another. Whenever you find yourself in a situation of not understanding why something is broken, that is a big hint that you have a false assumption somewhere and need to start proving and disproving them.






PARTNERS