The Joys Of Programming

Edwin wrote:

I am indeed.

Well, that's one mystery solved for today.

bandit0013 wrote:
Edwin wrote:

Someone talked about an IT Guild in this thread or another. It sounds similar to that.

Any more info than that? Searching for the word "guild" on a gamer site is going to be futile.

Probably talking about you, only a few pages back

Lex Cayman wrote:

Edwin, are you "The Edwin Garcia Links Machine"?

I never expected to find a Dubious Quality reference in this thread!

Pragmatic Programmers wrote:

40% off, Career Special - October 24, 2012

Technology will always change, and you can either change with it or get left behind. For instance, on this day in 1861, the first transcontinental telegraph line across the United States was completed. Great news if your career was in the new technology of telegraphy. Major bummer if you worked for the Pony Express, which was now out of business permanently.
Take a moment to review your career. We’ve got a couple of books that can help; use coupon code ItsMyCareer2012 and save 40%.

The fine print:

  • expires next Wednesday, October 31, 2012.
  • cannot be applied to existing orders
  • cannot be combined with any other coupon
  • you have to enter the coupon code ItsMyCareer2012 when checking out. After you’ve entered all your information, in the Order Summary, click on Apply Coupon to enter the coupon code.

Technical Blogging: Turn Your Expertise into a Remarkable Online Presence
Become more influential and earn extra money by blogging. Whether you want to create a popular technical blog from scratch or take your blog to the next level, this book shows you how with a complete, step-by-step road map to help you plan, create, market, monetize, and grow your own popular blog.
Now available from pragprog.com/book/actb.

The Developer’s Code: What Real Programmers Do
You’re already a great coder, but awesome coding chops aren’t always enough to get you through your toughest projects. You need these 50+ nuggets of wisdom. Veteran programmers: reinvigorate your passion for developing web applications. New programmers: here’s the guidance you need to get started. With this book, you’ll think about your job in new and enlightened ways.
Now available from pragprog.com/book/kcdc.

The Passionate Programmer: Creating a Remarkable Career in Software Development
Success in today’s IT environment requires you to view your career as a business endeavor. In this book, you’ll learn how to become an entrepreneur, driving your career in the direction of your choosing. You’ll learn how to build your software development career step by step, following the same path that you would follow if you were building, marketing, and selling a product. After all, your skills themselves are a product.
Now available from pragprog.com/book/cfcar2.

New Programmer’s Survival Manual: Navigate Your Workplace, Cube Farm, or Startup
Give your career the jolt it needs to get going: essential industry skills to help you apply your raw programming talent and make a name for yourself. It’s a realistic look at what really goes on in the office—and how to not only survive, but thrive in your first job and beyond.
Now available from pragprog.com/book/jcdeg.

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

SixteenBlue wrote:

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

When I get to work tomorrow I will tell you what we do (I think I know what you are trying to do ).

Hey all, I need some advice. I am running Windows 7 and Linux on a dual boot. I am taking an assembly language class and want to run some of my algorithms in C, just for the practice to keep up on syntax and such. I have all my classes' software in Windows this quarter, so I am trying to avoid having to boot into linux just to test my C code. I know I can get Cygwin to compile in Windows, but I seem to remember there were issues with that. I tried starting up a C program in Visual Studio, but that was a huge hassle and I couldn't quite get it to work. I even downloaded the C/C++ version of Eclipse but I need a compiler in my path. Can anyone offer any suggestions for a compiler that will run well in windows without jumping through too many hoops to make it work? I don't need anything overly fancy, I can even just write up my code in Notepad++, I just want something that works and won't take forever to set up each time I want to run something.

IlleBellus wrote:

Hey all, I need some advice. I am running Windows 7 and Linux on a dual boot. I am taking an assembly language class and want to run some of my algorithms in C, just for the practice to keep up on syntax and such. I have all my classes' software in Windows this quarter, so I am trying to avoid having to boot into linux just to test my C code. I know I can get Cygwin to compile in Windows, but I seem to remember there were issues with that. I tried starting up a C program in Visual Studio, but that was a huge hassle and I couldn't quite get it to work. I even downloaded the C/C++ version of Eclipse but I need a compiler in my path. Can anyone offer any suggestions for a compiler that will run well in windows without jumping through too many hoops to make it work? I don't need anything overly fancy, I can even just write up my code in Notepad++, I just want something that works and won't take forever to set up each time I want to run something.

Cygwin works fine for me. It's easy to install and gives you a complete Unix/Linux command line environment, with a fully functional GCC compiler. Almost anything written for Linux will usually compile out of the box on Cygwin.

Alternatively, you could try Mingw/MSYS. This gives you many of the standard Unix tools, including GCC again, running on the Windows command line. The only real advantage of Mingw over Cygwin is that it can build native Windows executables (anything built with Cygwin's GCC requires the Cygwin DLL at runtime). Compare to Cygwin, Mingw/MSYS is more complicated to install, has a less complete toolset, won't compile most Unix-targetted code, and you're stuck with the Windows CMD shell instead of Cygwin's bash.

(It is possible to build using the Mingw compiler from the Cygwin command line, but setting it up to work this way is a royal pain and requires intimate knowledge of both the Windows and Unix environments. And if anything goes wrong, the Cygwin and Mingw mailing lists will both tell you to sod off, it's them other guys' problem.)

IlleBellus wrote:

Hey all, I need some advice. I am running Windows 7 and Linux on a dual boot. I am taking an assembly language class and want to run some of my algorithms in C, just for the practice to keep up on syntax and such. I have all my classes' software in Windows this quarter, so I am trying to avoid having to boot into linux just to test my C code. I know I can get Cygwin to compile in Windows, but I seem to remember there were issues with that. I tried starting up a C program in Visual Studio, but that was a huge hassle and I couldn't quite get it to work. I even downloaded the C/C++ version of Eclipse but I need a compiler in my path. Can anyone offer any suggestions for a compiler that will run well in windows without jumping through too many hoops to make it work? I don't need anything overly fancy, I can even just write up my code in Notepad++, I just want something that works and won't take forever to set up each time I want to run something.

If you're used to building your code in Linux and you want something that is similar to that, then CaptainCrowbar's post above is perfect. If you're willing to go with a full IDE (you mentioned trying Eclipse), Visual Studio C++ Express would be your fastest/easiest way to get up and running. If you need pure C here's a post on Stack Overflow that helps with that.

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

You can always try running the linux kernel inside Windows with coLinux. It's been at least 3 years since I used it last but a quick check says it runs on Windows 7.

IlleBellus wrote:
kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

Do you know if you had the Guest Additions installed? VirtualBox without them is not a pleasant experience.

Also make sure you have virtualization enabled in the bios. And RAM is cheap, upgrade to the max.

nossid wrote:
IlleBellus wrote:
kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

Do you know if you had the Guest Additions installed? VirtualBox without them is not a pleasant experience.

I did have Guest Additions - It was explained to me that my processor did not do well with virtualization. Nothing really to do about it.

IlleBellus wrote:
nossid wrote:
IlleBellus wrote:
kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

Do you know if you had the Guest Additions installed? VirtualBox without them is not a pleasant experience.

I did have Guest Additions - It was explained to me that my processor did not do well with virtualization. Nothing really to do about it.

what processor if you don't mind me asking?

IlleBellus wrote:
nossid wrote:
IlleBellus wrote:
kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

Do you know if you had the Guest Additions installed? VirtualBox without them is not a pleasant experience.

I did have Guest Additions - It was explained to me that my processor did not do well with virtualization. Nothing really to do about it.

Ah, sounds like a CPU that lacks VTx (Intel) or AMD-V (AMD, duh).

Must be a bit old, virtually all CPUs from the past few years support their company's virtualization technology.

kazar wrote:
IlleBellus wrote:
nossid wrote:
IlleBellus wrote:
kazar wrote:

You could always install Linux in a virtual machine. Oracle virtual box is free and works well with centos.

Unfortunately, I've had bad experiences with Virtual Box on this machine. It doesn't run well. Super sluggish. I think I'll just have to suck it up and install cygwin.

Do you know if you had the Guest Additions installed? VirtualBox without them is not a pleasant experience.

I did have Guest Additions - It was explained to me that my processor did not do well with virtualization. Nothing really to do about it.

what processor if you don't mind me asking?

It's actually a Sandy Bridge i5.

IlleBellus wrote:

It's actually a Sandy Bridge i5.

I think that CPU would support virtualization. It is just a matter of the MB. Check the bios next time you boot to see if there is an option to turn on virutalization.

My work laptop also has an i5, but had hardware virtualization disabled. I actually had to call the manufacturer, and have them email me a new bios to flash and enable it. I still don't have the option in my bios, but it's now enabled.

It was kind of a bizarre situation.

SixteenBlue wrote:

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

I believe you could only do this by changing project settings in different build configs.

Quintin_Stone wrote:
SixteenBlue wrote:

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

I believe you could only do this by changing project settings in different build configs.

Oh...I had not thought of that, that would definitely work. Thanks!

Happy to help.

SixteenBlue wrote:
Quintin_Stone wrote:
SixteenBlue wrote:

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

I believe you could only do this by changing project settings in different build configs.

Oh...I had not thought of that, that would definitely work. Thanks!

Why do you want to do this in the first place? The situation you are trying to avoid sounds like the right way to do this. You already have two projects in the Solution. Adding a third is straightforward. The other way sounds like a lot of work and you lose a lot of the benefits of Visual Studio.

Garden Ninja wrote:
SixteenBlue wrote:
Quintin_Stone wrote:
SixteenBlue wrote:

Can Visual Studio be configured to create 2 different output types for a C++ project? In other words, can one project create both an executable and a .lib file, so I can use the .lib file for a unit test project? I'm guessing not and I'll have to make a lib project that the exe and test projects both depend on, but it would be nice if I could avoid that.

Edit: Another solution is just to include the source files of the base project in the test project but VS doesn't give you a way to include all source files (or all .obj files) so I'd have to manually add them. Probably would add up to more work than just refactoring my project structure.

I believe you could only do this by changing project settings in different build configs.

Oh...I had not thought of that, that would definitely work. Thanks!

Why do you want to do this in the first place? The situation you are trying to avoid sounds like the right way to do this. You already have two projects in the Solution. Adding a third is straightforward. The other way sounds like a lot of work and you lose a lot of the benefits of Visual Studio.

Pure laziness, haha. It's not really a crucial project, just something I'm doing for fun. It was already set up this way so if I could quickly make it work without refactoring, that's cool. Long term I probably should just do it the right way.

Two things I'm looking for help with:

1) Can anyone recommend a good Windows based tool for debugging HTML output on an iPhone. I spent about half the day trying to figure out why the html output on a page was messed up by iPhone Safari, but not iPad safari or any other browser (including Windows Safari set to use iOS headers). This turned out to be a styling issue, but I feel there has to be something like Firebug I could use to troubleshoot issues like this more effectively.

2) I feel like my skills are currently stagnating at my current job (yay enterprise Java!) after nearly 5 years with my current company. Without going into a ton of detail about my job (that's really for a different thread), I'm looking to try and start a personal project or two in my spare time for fun (and to start building up a personal portfolio). I really enjoy working with HTML as the I/O (as opposed to desktop applications), but I'm really out of the loop in terms of web programming these days (everything I've done in the last 4-5 years is with JSPs). I have some experience with PHP from college, and while I think I could pick that up easily I'd like to learn something else.

What's a good language for doing web based projects these days? I'm considering Ruby or Perl right now and Demyx suggested Python, but I haven't done much research on the subject to know if there's other options.

Can't speak to your first question but for current web tech:

For end to end site building look to a full MVC framework. Ruby, perl and python are all good choices there. I can definitely recommend both perl-catalyst and Ruby on Rails, I'm sure someone can suggest a great python option. Of course if you've got the java chops tomcat is solid, personally I don't find it especially fun to program with, ymmv.

Definitely get on top of html5 and css3, there's some powerful fun stuff there that I've recently not had the opportunity to really delve in to. Top fact: html5 and css3 together are Turing complete.

I'd also pick up some JavaScript and specifically JQuery. It makes JavaScript easy and fun and there are plugins for every piece interactive page widgettery out there. If possible try and avoid JQueryUI it's somewhat full of crud these days and editing the CSS there is a little hellish. That said it does a lot of neat things and its not that bad if your really must.

If you are stuck in Java-land and know JSP, Stripes is the way to go in my opinion. Easy to use (for Java-land), extremely powerful, and actually fun to work with. Works on Tomcat. Play! seems interesting as well (I've only used the Scala version, and I like it a lot).

But Rails is probably the best answer at the moment.

As for question 1, I hope someone answers because I am looking for something similar.

Echoing what others have said, to some extent...

Yep, definitely gotta get yourself working with a well-known framework. Broaden your horizons and move away from Java; Django (Python) and Rails (Ruby) would be excellent choices, I think. [Caveat: I haven't used them myself, since I was at a PHP shop for a previous job... but hoping to convert a fledgling side project over to Rails soon as a learning exercise.]

Frameworks are also useful for the client-side stuff. The current king of JavaScript is indeed jQuery, and for good reason -- that said, as you become more familiar with jQuery, you'll be more able to understand what its competitors are trying to address. You might even find something like HTML5 Boilerplate useful as a starting point for the presentation layer.

If you can, I would highly recommend reading up a bit on website security (OWASP cheat sheets and top 10 are great; also see the Reference section) and performance tuning (use YSlow or Chrome's built-in audits).

Oh, and if I can remember to do it, I'll trawl Hacker News and see if someone has already posted a tool matching your description in the first question.

Ok, random advice request. I am familiar with Java (I've taken a few courses in Java and my university uses Java as its primary language). I was playing with the idea of learning a little bit about controls for simple games (this is nothing I need for school, just a side curiosity on my part). I want to start by simply controlling a box on the screen using the directional arrows on the keyboard. In the GUI class I took (which, granted was not a computer graphics class) I would make a jlabel the size I wanted, create a buffered image, make the image the image icon for the jlabel, and do all my drawing there refreshing the image however many times a second I needed to in order to get the desired movement. This was well beyond the scope of the class, so I could not really ask the teacher and was pretty much flying solo.

I know there must be a better way to do this. My question is, how can I create a canvas or drawing area that I can refresh with whatever changes I want to make to my image? My end goal is to create a Space Invaders clone just to see if I can do it. I know that I could probably find code to do this online and just dissect that, but I want to struggle my way through it because I think I will learn more. Can anyone either tell me how to do this or point me in the right direction in terms of free online resources about this? I don't want to buy a textbook because a. I'm broke and b. I am less than year from graduating and need to focus my main energies on the classes I have remaining. But I might consider one post graduation.

Any and all suggestions are appreciated as always, you guys/gals have never let me down in the past. Thanks.

ps - I am also somewhat (albeit less) familiar with C# programming using Visual Studio 2010, but don't even know how to program any sort of graphics there, which is why I am inclined to use Java, at least to start. If C# has easier ways to do this, however, I would not be opposed to exploring that route. I am totally unfamiliar with C++ (other than a few classes in vanilla C)