Jump to content

learning by example


Derleek

Recommended Posts

Hey guys,

 

At times i have difficulty trying to figure out how to word my questions... I find it hard to ask a question without coming off like I'm asking for you guys to code for me.

 

I am not interested in just copy/pasting code into mine and praying it works. I prefer to see an example that is at least similar to what I'm attempting. I am in the works of creating my own web-design company and actually NEED to know this stuff.

 

I know its all about the language. I have trouble browsing the net for exactly what I need because I'm not sure how to look for it.

 

Ex: I need to find a way to scale a background image to fit whatever would fill up the screen of a user's resolution. Now I can't exactly type that into google and get any relevant results. Anything I find doesn't fit my specific needs (namely:The background picture of this site needs to be scaled without distortion, to whatever the user's resolution is).

 

I mean what do I do here, i can't/don't want to just ask for someone to build this for me. I am just not sure how to approach this...

 

I learn very well from example, but i hate it when I feel like i'm begging for people to do my work for me.

 

**I suppose in most cases I do make several attempts at the situation before asking for help... but for this specific case I do not have any clue how to do this

Link to comment
Share on other sites

the best way to figure out how to ask a question is to think about it analytically - that is, think about your problem and ask yourself what steps you need to do to solve the problem.  in this case, you might realize there are actually two steps here:

 

1. figure out what the user's resolution actually is.

2. figure out how to scale the background image.

 

those are two legitimate questions you could ask in the forums and get good responses.  it's always best to break down a problem and feed it to the appropriate people chunk-wise.  it's more enticing for us to answer a question quickly than to start typing a reply to one of those "where to begin?" questions.

 

believe me, if you sound like you want to understand and show that you've done a bit of legwork on an issue, most of us would be happy to provide a code example.  it's when people come around here showing no initiative and making an obvious request for the coding to be done for them that we generally avoid or lambast the poster.

 

as for #1, you're going to want some javascript.  as for #2, you'll need to look into the scaling calculations (which are actually quite simple - someone posted for help on that today in PHP Help).

Link to comment
Share on other sites

Also, the problem with "give me an example code" questions is that with coding, 9/10 times that's pretty much the same as saying "code it for me."  That may not be your intention, but to give an example more often than not, means to actually write it for you.  

 

It really boils down to what akitchin said: break it down into bite sized chunks as best you can.  People are more willing to "give you an example," even if it is in essence the same as writing it for you, if it's just a line or 2 of code, because it only takes a min or 2 to do.

 

 

Link to comment
Share on other sites

There's also the fact that if you break down your problem into smaller steps, you'll have a far better chance of googling for the solution to that part of the problem than the problem as a whole. In may well be that in searching for a part of the puzzle, you find the the whole solution too.

Link to comment
Share on other sites

makes sense.

 

I will take this into account for all future troubleshooting endeavor's. 

 

I've noticed when I show evidence of me actually TRYING to code it myself before I do it all you guru's have a little bit more patience.

Link to comment
Share on other sites

I've noticed when I show evidence of me actually TRYING to code it myself before I do it all you guru's have a little bit more patience.

 

I'm not taking things away from anyone or blowing smoke up our asses, but the Gurus and anyone else with recognition around here has probably demonstrated skills that can only be gotten from working hard and trying things out for themselves - screwing up loads and having tonnes of patience, learning, listening, applying, etc etc.

 

The problem these days is every man and his dog wants a website now, or wants to build the next Google/Facebook now - and those guys have made it look so easy yet the average (wo)man on the street doesn't see all the issues and problems that people go through to get something working. They just assume that they can get something quickly and easily for free to make their fortune.

 

Some people make their living out of these skills, and feel sort of cheated when people expect them to hold their hand all the way without a willingness to do a bit of research themselves. ie - why should someone put all the hard work in for someone else to reap all the rewards from?

 

We all start out in the same boat, but some are more focussed on trying to work things out for themselves a little first. These people are most likely to get the most constructive help because they've genuninely hit a brick wall and already probably have clearer goals of what they're trying to do. Not to mention they're the most likely to be appreciative, most likely to listen and take things on board, as well as most likely to return the favour. And lets face it - if nobody returned the favour, this place would have been dead a long time ago.

 

I don't ask as many questions here any more, but still stick around and try and help a bit - for these reasons I've mentioned. I learned pretty much everything from this place but my answers weren't all delivered on a plate.

 

Otherwise - ditto to much of the advice given above already, especially in respect to breaking up your problems first.

Link to comment
Share on other sites

I don't ask as many questions here any more, but still stick around and try and help a bit - for these reasons I've mentioned. I learned pretty much everything from this place but my answers weren't all delivered on a plate.

 

hear hear.  *raises glass*

Link to comment
Share on other sites

I completely agree with EVERYthing you just said redbull

 

The reason why I posted this thread was because I want to avoid being a 'mooch' on all accounts.  I am in fact interested in furthering my knowledge and skills as a programmer.  This is likely going to be my main form of income... indefinitely. Which means I am not interested in copy/paste.

 

I just had this thought while I was running into that proverbial "wall" with the issue mentioned.  I do not want any knowledge, let alone programming knowledge just handed to me on a silver platter.

 

This has been extremely beneficial to read.

 

-thanks

Link to comment
Share on other sites

I don't ask as many questions here any more, but still stick around and try and help a bit - for these reasons I've mentioned. I learned pretty much everything from this place but my answers weren't all delivered on a plate.

 

hear hear.  *raises glass*

 

 

I don't think I've asked a question in like a year.... x.x

 

But yeah, like others said, it helps to look at your problem as lots of little problems.

 

Also, try to avoid things like CAPS, words like now, soon, hurry, important, so on, and as long as you show an effort, people will atleast try to help.

Link to comment
Share on other sites

let me just say...

 

I've been through a LOT (caps are ok here... right?  ;)) of forums.  phpfreaks is by far the best i've come across for my php (and many other) needs.

 

hats off to you guys.  I look forward to the day when I no longer have to ask any questions!

 

--thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.