If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

For anything related to the Goblin's Community beyond the forum, or for anything that does not fit elsewhere. Newcomers should introduce themselves here.
User avatar
LAYF
Discussion Moderator
Discussion Moderator
Posts: 7100
Location: 5 degrees to the north of the first point on the last square!
Contact:

If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by LAYF » Sat Apr 13, 2013 7:37 pm

So, Ya. Programming!
Earlier today in the Random thread, there was a simple talk about a small programming issue, and in what can be called no time, the thread exploded. Apparently, we are more people who likes programming, from each of our own perspective.

So that is what this thread is for, all things programming.
Feel free to ask questions or make conversations about any aspect of programming, be it AI, Sim, Web, Game, Software or whatever... if you program or just like to, this thread is for you.

Please introduce yourself with some info about your programming skills/BG

Me:

Code: Select all

Started coding: Highschool, Turpo pacal.
Later:  AS2 (Flash), HTML, PHP, C++, Java.
Skill level: Hobby, //better at AS2 than any other, made some games in flash, tries to learn more//
Showcase: Seek for ZleapingBear on Newgrounds.com
Main interest: Game programming, AI and SIM.
Dream: To make a full game with game play and multiple levels single or multiplayer (Single first), preferably a light TD wit extra RTS elements.
-Best regards LAYF

User avatar
I'mBob
Game Master
Posts: 2102
Location: The Holy Land

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by I'mBob » Sun Apr 14, 2013 6:33 am

Code: Select all

Started coding: A few years ago, end of high school.
Later:  HTML, C#, Java(partial, still learning), Javascript
Skill level: Hobby, currently. Possibly much more in the future, as it might be what I will learn at university. 
Showcase: Nothing, really.
Main interest: Just programming in general, I really like computers but I don't really do anything with this knowledge. 
Dream: To make a minecraft mod based on goblins comic. 
► Show Spoiler
This account is on a hiatus until unknown.

User avatar
LooksAndSmiles
Game Master
Posts: 1364

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by LooksAndSmiles » Sun Apr 14, 2013 10:19 am

Anyone has any experience with the G3D graphics engine?

Code: Select all

Started Coding: After finishing primary school, I think (Turbo Pascal, Delphi)
Later: C++, Java, currently focusing on Android, meager PHP knowledge (+html, sql)
Skill Level: Amateur. I'm still stuying at university, and working on an Android app in a part-time job. As much as I'd like to pride myself with good skills, I'm not that good, but I think I'm capable of progression.
Showcase: Nothing I'd like to show. Finished some small projects, mostly for the university.
Main Interest: whatever catches my attention. Game programming, related issues (path finding, AI, backbone structures). I hate doing graphics, they take too much time.
Dream: make a lot of small and fun applications, or possibly few but good ones. I had a lot more creativity and motivation before, but the university successfully killed out a large chunk of it, so yeah.
Inventing forum games since '10 ...
Skill Table Cheat Sheet for my players in the Minesweepers game.
Random dragons I help growing up:ImageImageImageImage And my own dragons are here. The hatched ones like the clicks! :D

User avatar
LAYF
Discussion Moderator
Discussion Moderator
Posts: 7100
Location: 5 degrees to the north of the first point on the last square!
Contact:

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by LAYF » Sun Apr 14, 2013 10:34 am

Hmm.. only looked at it, While it seems good, I doped it, as I wanted to focus on learning Java.. so... I cant help much there I'm afraid...
-Best regards LAYF

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Sun Apr 14, 2013 1:52 pm

Code: Select all

Started coding: Started with self-education online to get the main gripes... Now following programming education.
Later:  Nothing yet!
Skill level: I'd consider myself "rookie" at this level... 
Showcase: Nothing actually worth showing I'm afraid. Well, gues it depends. Is a bee you can move around with buttons anything interesting? :roll:
Main interest: Currently actually learning to code! And then... Well, who knows?
Dream: I suppose in the end actually helping to create a big game would be a massive achievement... But in the end, I generally seem to "enjoy" coding and realize the market for games would be far, far smaller... So we'll see how things go!

User avatar
TinSoldier
Is Heard Often
Posts: 315
UStream Username: TinSoldier6
Contact:

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by TinSoldier » Tue Apr 16, 2013 7:35 pm

I'm just a dabbler who never really proceeded past the intermediate stage, but I am still VERY interested in programming topics at all levels.

Code: Select all

Started coding: Middle School, Applesoft BASIC and Commodore BASIC

Later: Apple Pascal, C, C++, Java, Awk, Bash Shell, C Shell, Euphoria, Javascript

Skill level: Beginning to intermediate hobbyist. I understand a lot of concepts but I haven't done as much practical application.

Showcase: Contributor to Euphoria language (a lesser-known open-source project). Die roller in Javascript. Some scripts for work in Awk and C Shell.

Main Interest: Rogue-like games, other role-playing games and tools for roleplaying games. Systems programming.

Dream: To create a Goblins rogue-like and a mecha rogue-like, but simple for casual gamers. I would LOVE to rework the AmiWM window manager (a window manager for X) to be more modern, more configurable, and to include an Amiga Workbench-like file manager program, but I just don't grok the code.

Heck, someone else wrote an Amiga GUI emulator in Javascript. There is NO WAY I could duplicate that.
► Show Spoiler

User avatar
mnementh
Former Mod
Posts: 1108

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by mnementh » Sat Apr 20, 2013 9:29 pm

I wrote an entire character sheet generator in QBasic when I was a kid; even ported it to C64 when my CP/M console got wormy.

Think I also coded a RND Die-rolling script that actually presented die facets using ASCII art...

In other words, stuff you can probably get an app for free on your smartphone that would write it for you nowadays. With actual graphics. And probably internet connectivity. And sound. And porb\nographic advertising.

Did the required scripting and design work for two college degrees; though I'm starting to get into Arduinos now. They sure are a lot simpler to work with than BASIC STAMPs and PICs. >:P


mnem
Paturby.

User avatar
SeeAMoose
Admin Moose on the Loose
Admin Moose on the Loose
Posts: 1427
UStream Username: See_a_Moose
Location: Maryland (DC Area)

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by SeeAMoose » Thu Apr 25, 2013 9:23 pm

I'll post a more detailed breakdown later, but I'm essentially self taught in mIRC scripting (which I've been told is a bastardized version of perl) and Visual Basic (VBA primarily although I'm starting on VBScript). The former is entirely related to BotWalter for the chat (he's a big boy now at 4379 lines of code... a lot of which I need to pull out and eliminate or rework to make it more efficient) . The latter I use primarily to improve my efficiency at work.
I am one of the forum admins and chat moderators. Drop any of us a line if you ever need a hand in either the forum or the chat.
You can reach me at AdminMoose@goblinsforum.com or at BotWalter@gmail.com

User avatar
mnementh
Former Mod
Posts: 1108

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by mnementh » Mon Apr 29, 2013 4:51 pm

Oh lordy... we won't even get close to my KickChatScript; I think mnem had about 200 custom alts and 500+ aliases when he was really busy in Dominion & Skiffy chats.

Bastardized is right; more unclosed parens than a soccer match. :P


mnem
*Perl-a-Whirl*

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Sun Jun 02, 2013 1:39 pm

Hey, a question for you guys that are a bit more versed in the acts of programming- Jquery to be precise. Basically, I have a code I need to get working, (which I based on the work of someone else) which should, upon pushing a button, change a picture on the page. Essentially, it would allow one to cycle through a predetermined list of images, as well as giving a small description of the image.

I'm not sure where the problem lays. I think there might be a problem with either the counter or initializing, but I wouldn't be sure why. I included the code below if any of you more skilled guys can see what (basic, probably) screwup I made.
► Show Spoiler

User avatar
gamecreator
Prattles on Unremittingly
Posts: 3116
Location: Ukraine

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by gamecreator » Sun Jun 02, 2013 4:25 pm

You forgot to say what the problem is, exactly. Does it not work altogether, or work partially, or what?

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Sun Jun 02, 2013 4:39 pm

Oh, sorry- The actual script part doesn't seem to work at all. The page itself loads fine of course, as it has a preset- But somewhere in the process of having the browser detect you pushing that button and it changing the picture/text something seems to go wrong. And of course that's very annoying, since you don't actually get any warning about where it's going wrong with jquery/javascript- At least, not in the editor I'm using... I'm uncertain if there are other editors made for that purpose.

User avatar
gamecreator
Prattles on Unremittingly
Posts: 3116
Location: Ukraine

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by gamecreator » Mon Jun 03, 2013 6:42 am

There are debuggers. Firefox has a built-in one and I'm sure there are debuggers for other browsers too.

Also there is a possibility of counter becoming 3 and accessing nonexistent data. And I advice you to separate page-changing part into a procedure (which takes counter value as argument) to avoid mismatched page-changing code you have now.

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Mon Jun 03, 2013 7:33 am

Oh derp, that three was a minor screw up- It only counts to two, of course. Though, that isn't where the problem lies- It would still have counted to three, but just given us no picture or no change on three as there would be no assigned values for it. The problem still lies with actually changing the picture.

There's currently no page-changing included yet- to do that I would have to add another .attr which specifies the link in the <a> tag that wraps around the image, and changes it destination according to the urlarray. Whether or not that would work is a different matter, but that could always still be fixed if necessary.

And there's basic syntax checkers, yes- However, there's no actual way to see where those functions interacting with each other goes wrong. Netbeans does offer said functionality with jsp pages, allowing you to "stop" the process on specific lines of code, seeing what is loaded into each variable, allowing you to pinpoint exactly where the problem lies. There is no such functionality for jquery, however, it seems.

...I probably shouldn't, but I do actually have the prototype site hosted on the internet. If you want me to, I could pm you the adress of the specific (prototype) page so you can take a look at it in full. It would all be in dutch however, of course.

User avatar
LAYF
Discussion Moderator
Discussion Moderator
Posts: 7100
Location: 5 degrees to the north of the first point on the last square!
Contact:

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by LAYF » Mon Jun 03, 2013 8:54 am

Hmm.. I newer use Jq myself, so i cant say what the error is.. but i can mention what i see, following normal logic...

1st, i guess its written by a dane originaly... (danich words being used here and there)

2nd I note that in the Back and the futher script, you write Bind and Blind, is it not supposed to be Bind both places?

Code: Select all

 $(document).ready(
                    function() {
                        $('#back').bind('click', back);
                        $('#further').blind('click', further);
                    }
            );

3rd -the aantal variable (aantal being danich for amount) is 3, while getal is 0, giving you a total of 4 images, and you only have 3 defined in hte array.

4th The urlArray points to a html file for each picture, is it the case that such files exists? as i read it, its supposed to load from jpg's and not html sites....


5th your back and futher functions seems to not be the same in the last line of the code

Code: Select all

function back() {
                getal--;
                if (getal <= 0){
                   getal = 0;
                }
                $('img#change').attr('src','images/' + getal + '.JPG'); (images conveniently named with only a number and placed in the images folder)
                $('h3#titel').text(getalArray[getal]);

            }
            
            function further(){
                getal++;
                if (getal >= aantal){
                    getal = aantal;
                }
                $('img#change').attr('src', 'images/' + getal + '.JPG');
                $('h3').text(getalArray[getal]);


$('h3#titel').text(getalArray[getal]);
AND----
$('h3').text(getalArray[getal]);



thats all i can spot not knowing the script... do you have the original script, does that work? and if it do, can you show it to us?
-Best regards LAYF

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Mon Jun 03, 2013 9:15 am

2nd I note that in the Back and the futher script, you write Bind and Blind, is it not supposed to be Bind both places?
... I am an idiot. I don't know why in the ten times I looked it over I didn't see that said blind instead of bind. That fixed it all- It always worked, but of course without the controls bound to go one further, it would never show anything. Stupid mistake, but then again I guess that's 90% of all programming errors.(that being said, I seem to have the habit of working myself into the most exotic of errors, giving my teachers an hour of work to find the exact problem...)

Anyways, it fully works now, but I'll answer your further questions just because.
1st, i guess its written by a dane originaly... (danich words being used here and there)
Dutch actually, but yes.
3rd -the aantal variable (aantal being danich for amount) is 3, while getal is 0, giving you a total of 4 images, and you only have 3 defined in hte array.
Yup, GC pointed that out- It's fixed. :)
4th The urlArray points to a html file for each picture, is it the case that such files exists? as i read it, its supposed to load from jpg's and not html sites....
Ah, no, the point of the urlArray is to, if people click the image, to lead them to a different page on the website- I hadn't implemented this yet as I first wanted to make the program work, but I'm going to add it in right now. The code used for changing the picture is this:

$('img#change').attr('src','images/' + getal + '.JPG');

which would change the src attribute of the img tag with identifier "change", and replace it with the url of the new appropriate jpg file. Changing the url would work similar, except I would apply to the a tag with proper identifier and change the href property, with what I stored in the urlArray
5th your back and futher functions seems to not be the same in the last line of the code
Yeah- I removed the identifier from the last one, simply to check if that could perhaps be the problem. With no result of course, as the problem lay elsewhere.

User avatar
gamecreator
Prattles on Unremittingly
Posts: 3116
Location: Ukraine

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by gamecreator » Mon Jun 03, 2013 11:40 am

M0rtimer wrote:There's currently no page-changing included yet
Under page-changing i meant one that edits present page, i.e. changes it. This code:

Code: Select all

                $('img#change').attr('src','images/' + getal + '.JPG'); (images conveniently named with only a number and placed in the images folder)
                $('h3#titel').text(getalArray[getal]);
M0rtimer wrote:I removed the identifier from the last one, simply to check if that could perhaps be the problem.
If you done the testing, why haven't you placed message box call to see if the code is executed at all?

User avatar
LAYF
Discussion Moderator
Discussion Moderator
Posts: 7100
Location: 5 degrees to the north of the first point on the last square!
Contact:

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by LAYF » Mon Jun 03, 2013 12:23 pm

M0rtimer wrote:
2nd I note that in the Back and the futher script, you write Bind and Blind, is it not supposed to be Bind both places?
... I am an idiot. I don't know why in the ten times I looked it over I didn't see that said blind instead of bind. That fixed it all- It always worked, but of course without the controls bound to go one further, it would never show anything. Stupid mistake, but then again I guess that's 90% of all programming errors.(that being said, I seem to have the habit of working myself into the most exotic of errors, giving my teachers an hour of work to find the exact problem...)

Anyways, it fully works now, but I'll answer your further questions just because.

Good, my work here is done.... come my fine side kick... to the code-cave awaaaayyyyy!!!!:.......
-Best regards LAYF

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Mon Jun 03, 2013 12:46 pm

If you done the testing, why haven't you placed message box call to see if the code is executed at all?
That's... A good idea actually. I'll have to remember that for next time for error-checking.

User avatar
gamecreator
Prattles on Unremittingly
Posts: 3116
Location: Ukraine

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by gamecreator » Mon Jun 03, 2013 1:27 pm

I think I should suggest this method more then. It really was obvious for me, so I thought everyone knows about it too.

Anyway, message boxes are perfect debugging tool. Use them if you have no debugger or when it's more convenient. And they can show you variables' values too.
Last edited by gamecreator on Mon Jun 03, 2013 2:00 pm, edited 1 time in total.

User avatar
M0rtimer
Global Moderator
Posts: 14109

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by M0rtimer » Mon Jun 03, 2013 1:35 pm

Yeah, it does make sense to use an easily visible function for the purpose of debugging. A messagebox is perfect for that. It just hadn't occurred to me.

User avatar
Liesmith
Indulges in Conversation
Posts: 752
UStream Username: Liesmith

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by Liesmith » Thu Jun 13, 2013 11:09 pm

I have none of that fancy programmin' education, but I've had some time to start learning it at my new job, even though my role has nothing to do with programming, I just enjoy it immensely.

I made an overcomplicated Visual Basic (don't laugh!) application that reads plain-text SecureCRT or PuTTY log files and finds every instance of the "prstat -a" or "prstat -t" output, picks out the usernames and their associated cpu utilization, and formats it into a very clean output in a rich text box. It also sorts it into a data grid view, so you can copy it into Excel with minimal hassle. It also plots all the data points, with a separate plot line for each username, so it won't give confusing results even if you log out of one network and into another while running the same logfile (unless each network has identical usernames).

The application has almost NO use, but I am irrationally proud of it because it's the first thing I made that I actually finished. Because it was such a big boost to my ego, I started writing a bash script to do something also very useless, but I'll spoiler it so this isn't a novel:
► Show Spoiler
Needless to say, this is useful to no one, but we wanted to have the ability to few historical cpu utilization statistics on Sun servers (but not enough to spend any money), so this was our most feasible option.

Here's the moral of all this rambling: if you're getting into programming for the first time, playing around with Visual Basic in Visual Studio 2012 (free!) is a great place to get a little bit of a foundation. It's safe and forgiving enough that you can learn the basic terminology and thought processes. Once you get really confident in your basic skills, try to do some Bourne shell scripting.

After you recover from your internal injuries, give Bash a whirl, it's much less of a pain than Bourne, but also less portable.

Once the crushing depression wears off, go back to Visual Basic. It's ok.

When I went back to VB.net to lick my wounds, I made a GUI for the DOS File Comparison utility that comes with windows, because I like doing pointless things that apparently no one else on the internet has ever tried to do because they're of incredibly questionable utility.
"All it takes is one bad day to reduce the sanest man alive to lunacy. That's how far the world is from where I am. Just one bad day. You had a bad day once. Am I right? I know I am. I can tell. You had a bad day and everything changed."
► Show Spoiler

alpha1714
Remains Silent
Posts: 3

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by alpha1714 » Mon Jul 15, 2013 6:10 pm

Not being particularly well-versed in the dark arts of programming myself, you guys might be the droids I'm looking for.

I like Thunt's new update countdown timer, but I'd really like to have a Chrome extension that would display the timer in my browser without having to load the entire comic page. Due to extraneous circumstances like living on a remote island in Japan, phone-tethered internet is often my only link, making full graphic page loads feel like passing a pixelated kidney stone. Any sort of API key or code-grabber options that you think might work?

Sushi and soysauce,

alpha1714

User avatar
Krulle
Transcribes Goblins
Posts: 8116
Contact:

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by Krulle » Tue Jul 16, 2013 4:00 am

I tried to, but I run into a problem:
► Show Spoiler
TL;DR: sorry, I did not find a ready possibility to grab the remaining time till update to ease your problems.
As a long time dial-up user, I know your frustration. I'd love to help, but I do not see a ready possibility to do it....


Also, a copy of the timer here on the forum would be fantástico!

Or a small page on goblinscomic.com¦org with just the countdown (and maybe a small ad).
Goblinscomic transcriptions
Collection of G:AR cards

alpha1714
Remains Silent
Posts: 3

Re: If(YourSkills==ÔÇØProgrammingÔÇØ) Goto(Here);

Post by alpha1714 » Tue Jul 16, 2013 4:33 am

Hey, thanks for looking into this!

I also chopped up the code from the main page pretty ruthlessly, got about the same thing you did. Oh well, at least I can load my skeletal version of the main page faster than the whole thing to at least see the timer...

Anyone else have any ideas? If it is all server-side, maybe someone has a suggestion for Thunt so he can make it easier for us to grab the code somehow?

Anyway, thanks again!

Post Reply