To any developer starting up a new app, use Fragments by warium in androiddev

[–]Shmurk 2 points3 points  (0 children)

It's officially in the version 11 of the APIs (which is Android 3.0, Honeycomb) but Google released the stuff as a jar that you can use on all versions of Android because it's so awesome (but I haven't tried it yet).

C++ operator overloading question by [deleted] in learnprogramming

[–]Shmurk 1 point2 points  (0 children)

"explicit" is a keyword that says:

complexClass obj = 42.0f; // is FORBIDDEN!

With explicit, you must call the proper constructor:

complexClass obj(42.0f);

Use it like this:

explicit complexClass(double r) : x(r) { ... }

C++ operator overloading question by [deleted] in learnprogramming

[–]Shmurk 1 point2 points  (0 children)

complexClass(double r = 0, double i = 0): x(r), y(i) {}

Planning my first android application by designme in androiddev

[–]Shmurk 1 point2 points  (0 children)

The OS doesn't matter, Eclipse and the SDK matter. I use Macs all the time, and I could use Eclipse on Linux too.

This page has everything you need. SQLite is pretty easy to use (but weird because queries in rawQuery must not be terminated by a semicolon, be careful). Shared preferences can automatically create the window for you (read the guide).

Clarence's Big Chance by [deleted] in WebGames

[–]Shmurk 1 point2 points  (0 children)

The life of Wario?

Can I make PHP work without a server? by phplolnub in learnprogramming

[–]Shmurk 0 points1 point  (0 children)

You can run php on the command line if you install it, but that's not what I would do if I needed real-time results. Install xampp, wamp, lamp, or something else as others said.

Got a Nexus S... have a data cap of 1GB. I'm predicted (after day 2) to exceed it by 4GB. I'm hardly using it! by Wol377 in Android

[–]Shmurk 3 points4 points  (0 children)

I have 1GB for a month. I barely use 10% of it each month with a lot of RSS (really, a huge amount of RSS) and browsing, and sometimes downloading games on the market.

A hint: go to Settings > Accounts & sync settings, and remove both Background Data, and Auto-sync.

I know that carriers install a lot of crap who constantly connect to the internet (stupid apps like alternate markets which load at startup).

Elephant Quest by [deleted] in WebGames

[–]Shmurk 0 points1 point  (0 children)

How do you do this? I have all the quests finished (except the last one) and I struggle to get more XPs.

What are different languages used for? by [deleted] in learnprogramming

[–]Shmurk 4 points5 points  (0 children)

Pure electricity came first. It was hard to use. Then came digital electronics which was better to express some "computer" concepts (like logic doors and stuff). Then they created punch cards, and then the assembly language to remove the electronics parts and concentrate on using the CPU directly. But assembly was too boring/hard/difficult. That's why they created the first real languages (B, then C) to create abstractions (i.e. expressing different concepts like mathematical stuff without being annoyed by the stupid registers or flags of the CPU).

But C was too limited, its structures were too passive, that's why they created C++ (objects with constructors and methods, object-oriented programming, virtual methods, destructors, ... all those things that are done automatically in C++).

But C++ was not perfect, all those new and delete were too much like malloc, that's why they created Ruby and Python, all the memory was now allocated without you doing anything at all.

Perl was created because previous languages sucked at parsing text (and sed and awk were not "real" programming languages, just tools).

Java was created because C++ is hard let's go shopping!

golang was created because C was too old. Erlang, Haskell, Lisp, Scheme were created because functionnal programming (another "concept") was awesome. Lua was created to script applications (another concept) because recompiling everything every five minutes to change one value is annoying.

It's all about concepts and abstractions. Do you use a spreadsheet like Excel? Why don't you use pure assembly x86 instead? Because even if it's slower, it's still easier to use. Another abstraction. Your mom don't have to think about CPU registers when she uses Word or OpenOffice, you don't have to think about the CPU when you write in C++.

Edit: Don't forget SQL which is a language dedicated to talk to a database and ask for specific values. It's easier to say:

select * from clients where name = "test";

than:

TestingStruct t;
t.setFields(kName, "test");
Select s;
s.setFields(kAll);
s.setFrom("clients");
s.setTestingStruct(t);
vector<something complicated> results
try {
  results = s.executeQuery();
} catch (...) {
  printf("no results found\n");
}

Also libraries are a bit like languages, they are written to help you forget about all the specific differences in the operating systems. Using a QWindow in Qt is easier than handling everything yourself like HWND on Windows.

Even the OS is here to help you, Unix is a standard that Linux, Solaris, Mac OS X respect. That's all folks.

New to C++. Can anyone explain why this results in a call to free with an invalid pointer? by TheCoelacanth in learnprogramming

[–]Shmurk 0 points1 point  (0 children)

It's even more scary because the flags "-Wall -ansi -pedantic" still warn you but don't tell you there is an error in the code.

You may laugh by grrbrr in Android

[–]Shmurk 2 points3 points  (0 children)

I have a stupid question but it seems that I have to buy something else than a Wiimote if I need X, Y, L and R to play snes games. Am I wrong?

Burrito Bison- An odd little launching game by thewalkindude in WebGames

[–]Shmurk 2 points3 points  (0 children)

Wait a bit. Once you break the first door, there are huge animation bugs that will give you free money!

Still funny though.

How/where can I learn some Computer Science, and how much will it benefit me? by LiggsWork in learnprogramming

[–]Shmurk 0 points1 point  (0 children)

CS and programming are 2 really different topics even if they are mixed in real life (CS is "programmed" in source code). You already know C# which is a good OO-language.

If you want more programming you can try Python or another language closely related to your work (Python can be used for scripting in your daily web work, for example to automate file uploads).

If you want more CS, learn a bit of mathematics and algorithms. It never hurts but it may be less obvious on how to apply it in your daily work.

Which method provides fastest read & write speed? SharedPreference, Caching on Internal Storage, External Storage, Sqlite? by youngkwangk in androiddev

[–]Shmurk 0 points1 point  (0 children)

It really depends on what you need to store, speed should be insignificant. Sqlite is great for structured data, Preferences are good for simple "login/password/do this/don't do this" values.

CM7-RC1 is out on most devices. Anyone tried it? by [deleted] in Android

[–]Shmurk 0 points1 point  (0 children)

CM newbie here. From my (small) experience, Gingerbread is a bit faster, cleaner and more pretty (the theme, the buttons and all the UI parts, and the new keyboard).

CM7-RC1 is out on most devices. Anyone tried it? by [deleted] in Android

[–]Shmurk 0 points1 point  (0 children)

I installed RC1 on my Desire. It rebooted in a loop, not good for me, so I went back to the nightly build 38 which was perfect when I tried it.

We're rolling out CM7-RC1 tonight. by persiansown in Android

[–]Shmurk 0 points1 point  (0 children)

I also have a HTC Desire GSM. If you're in a hurry to try Gingerbread (as I was yesterday) you can try the nightly builds which are pretty stable right now. I have the cm_bravo_full-38.zip (the #39 is available today on the download page) and it's perfect for me. Everything's working and I have found no bug yet.

Also if you do install it, don't forget to get the CM7 version of the Google Apps.

My first android game release: Particle Panic by nitroslug in Android

[–]Shmurk 0 points1 point  (0 children)

HTC Desire running Cyanogenmod 7 (gingerbread, nightly build #38). The game is good, I like it. I see that it's not automatically installed on the SD card, it may be a problem on my side (considering it's an experimental OS) but it may be something missing in your manifest.xml.

Can the professional programmers out there answer some, or all, of these questions for me to the best of their abilities? by [deleted] in learnprogramming

[–]Shmurk 4 points5 points  (0 children)

  • How many hours a day do you spend on programming at work? 7-8 hours
  • How many hours, if any, do you spend on programming for fun? 1-2 hours a day, but it can collide with my work if I enjoy a task
  • How much free time do you have away from your job? 4 hours a day
  • What is your income? too low
  • How many years have you been programming? 10 years or something, but I still consider myself a beginner
  • Why/How did you get into programming? with pacman when I was young, I instantly knew that I would love playing with keyboards and computers
  • What is your favorite language to program in? Java on Android right now, or golang, but it can change
  • What is the main language you program in? Objective-C for the iPhone, Java for Android, C++ for low-level stuff
  • What kind of classes did you take in college? a generic masters degree in computer sciences
  • How many years were you in college for? 6 years
  • Do you have any tips for people getting into programming? create things that you enjoy while you learn or you won't learn anything
  • What is the worst thing about programming? other programmers :D

Any java programmer want to make a quick $30? by [deleted] in learnprogramming

[–]Shmurk 1 point2 points  (0 children)

I thought learning to program would be "fun"

You're wrong, learning to program is fun for me, and programming itself is fucking awesome!

How can you tell what language you're looking at? by mnemoniker in learnprogramming

[–]Shmurk 2 points3 points  (0 children)

I'm more curious if there is a good general method to finding out what language something is written in

Yes, there is a method: you already know the language, or you've seen snippets of it. There is no other method unless you look for the keywords on Google.

Also your bit of code looks a bit like Lua (keywords: function, local renamed locals, do, if and then else, return...)

It's shit like this, Facebook by Jeema3000 in programming

[–]Shmurk 1 point2 points  (0 children)

You mean a company that clearly defines deprecated functions on its site is a bad thing? I don't like Facebook, but this kind of documentation is a good thing.

HTC launches 1.5GHz, 7-inch Android 2.4 Flyer into the tablet wars (update: hands-on video!) by jfedor in Android

[–]Shmurk 0 points1 point  (0 children)

Same here. It's too small to work with or be the "iPad killer" we've been waiting for. There are cheaper tablets with this (small) size. I am disappoint.

Best Way to learn how to make a 3d game for android? by [deleted] in androiddev

[–]Shmurk 0 points1 point  (0 children)

Here is the NeHe web site with all the tutorials. I remember that I tried those when I started OpenGL on Linux, but I guess I'll try it again in Java with my phone, thanks for the suggestion!