Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32
  1. #11
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    No. Not at all.

    If you're going to do it. Do it right, do it effectively, don't cut corners.

  2. #12
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    Quote Originally Posted by Source View Post
    No. Not at all.

    If you're going to do it. Do it right, do it effectively, don't cut corners.
    As I said, there's no point spending too much time on something which isn't important. I spend a lot of time doing commissioned work properly, but I assume this isn't commissioned as he has to ask how to use explode, so there's no point spending a lot of time on it. Time management is an important part of being a successful developer and this situation certainly isn't one I would delegate a lot of time to.
    we're smiling but we're close to tears, even after all these years

  3. #13
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    I can guarantee for a well-skilled developer, doing regex over explode in this situation would be the same amount of time - if not quicker.

    Your point of "this isn't commissioned as he has to ask how to use explode, so there's no point spending a lot of time on it.", holds no backing in my opinion. Explode would get the job done, but as he is clearly learning it would be better in the long run if he learns it (regex) now. Albeit not the best example.

    He doesn't have to use it, but the option is there if he wants to.
    Last edited by Source; 03-06-2010 at 06:33 PM.

  4. #14
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    I think efficiency is the most important. If you're working for Google, Facebook or Youtube who get thousands of connections every second, they want what's best for both the server and the client.

    It's like Object-oriented PHP, it takes a while to learn but the output is a lot better.

  5. #15
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    Quote Originally Posted by Source View Post
    I can guarantee for a well-skilled developer, doing regex over explode in this situation would be the same amount of time - if not quicker.

    Your point of "this isn't commissioned as he has to ask how to use explode, so there's no point spending a lot of time on it.", holds no backing in my opinion. Explode would get the job done, but as he is clearly learning it would be better in the long run if he learns it (regex) now. Albeit not the best example.

    He doesn't have to use it, but the option is there if he wants to.
    Writing the regular expression over explode? Explode would be much faster.

    It holds in my opinion. If I was developing something for my own personal use, efficiency wouldn't be a paramount concern for me, simply getting the code done would be much more important. Fair enough, if he wants to learn about it, using regex would be a good idea. However, personally, I would use explode if this wasn't commissioned, simply because of how quick using explode would be.

    Quote Originally Posted by Jack120 View Post
    I think efficiency is the most important. If you're working for Google, Facebook or Youtube who get thousands of connections every second, they want what's best for both the server and the client.

    It's like Object-oriented PHP, it takes a while to learn but the output is a lot better.
    I never said efficiency wasn't important. I said efficiency isn't important for a small scale, personal script. Efficiency is one of the most important considerations when coding something that will be public, even if it's not a site with a high footfall. Yes, I understand about OOP considering I code Actionscript 3 which is entirely OO based. I'm not disagreeing with any of the things said in this thread, simply stating my opinion on how I would approach this if it was my project.
    we're smiling but we're close to tears, even after all these years

  6. #16
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by MattFr View Post
    I wasn't moaning. A log viewer isn't something that needs to be efficient though, I think practically for the application; there's no point doing the regex for something that isn't important. See see?
    You must have never worked with a large log before. When you start getting thousands, ten thousands, and hundred thousands of records.. you want to view and sort through them rather quickly.

    A bodged down application, which has a flawed solution will only create more stress. It would be easier to match the string, then explode it instance by instance until you get what you want.

    Explode isn't the best solution when it comes to this. If structure changes, your entire explode sequence would too. If it changed with a simple regex, one line would have to be configured.

    Personal project or not, you should always code to long term time-saving, as well as efficiency.

    I know I'd rather edit one / two lines of regex matching, then 7-8 lines of exploding and finding, then separation.

    Whether it is just you, or an actual customer.. when it comes down to it in the future you will be glad you chose the right solution over the "fastest" solution for you to do. I've done it many times and regretted it when it came to modification / update time.
    Last edited by Dentafrice; 08-06-2010 at 12:22 PM.

  7. #17
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    Quote Originally Posted by Dentafrice View Post
    You must have never worked with a large log before. When you start getting thousands, ten thousands, and hundred thousands of records.. you want to view and sort through them rather quickly.

    A bodged down application, which has a flawed solution will only create more stress. It would be easier to match the string, then explode it instance by instance until you get what you want.

    Explode isn't the best solution when it comes to this. If structure changes, your entire explode sequence would too. If it changed with a simple regex, one line would have to be configured.

    Personal project or not, you should always code to long term time-saving, as well as efficiency.

    I know I'd rather edit one / two lines of regex matching, then 7-8 lines of exploding and finding, then separation.

    Whether it is just you, or an actual customer.. when it comes down to it in the future you will be glad you chose the right solution over the "fastest" solution for you to do. I've done it many times and regretted it when it came to modification / update time.
    Thanks for telling me I have never worked with a large log file. I made a questionnaire system for a client, parsing thousands of rows to a CSV file, all done with regex. I stand by what I said.
    we're smiling but we're close to tears, even after all these years

  8. #18
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Then why would you not use the better method in an application like this? Are you saying you don't spend as much time implementing a good solution when it's work for your own self, or as you said small sites..?

    If you used regex on your questionnaire system, there had to be a reason right? It worked better.. it was more efficient.. it got the job done right.. but yet on something of similar nature, that might not be as important.. or as popular.. you're saying implement a solution that will prove to be more work in the end, if it ever needs changing.. as well as pointlessly complex for what he needs.. correct?

    Sounds like laziness.

    Also, you call thousands of rows of questions a large log file? What about access logs, ever worked with them? They get quite large.. way larger then any questionnaire system ever would get. They require characteristics that other things do not.
    Last edited by Dentafrice; 08-06-2010 at 02:19 PM.

  9. #19
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    Quote Originally Posted by Dentafrice View Post
    Then why would you not use the better method in an application like this? Are you saying you don't spend as much time implementing a good solution when it's work for your own self, or as you said small sites..?

    If you used regex on your questionnaire system, there had to be a reason right? It worked better.. it was more efficient.. it got the job done right.. but yet on something of similar nature, that might not be as important.. or as popular.. you're saying implement a solution that will prove to be more work in the end, if it ever needs changing.. as well as pointlessly complex for what he needs.. correct?

    Sounds like laziness.

    Also, you call thousands of rows of questions a large log file? What about access logs, ever worked with them? They get quite large.. way larger then any questionnaire system ever would get. They require characteristics that other things do not.
    At the end of the day the way I code for my own personal things are the way I chose to do it. Yeah, I'm lazy when I'm coding for myself, that's because I've been coding for clients for too long and coding bores me, money is the only thing that inspires me to code, hence why I code ANY commissioned work in the most efficient way I can.
    we're smiling but we're close to tears, even after all these years

  10. #20
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    The issue comes down to the HxF community Caleb. People are extremely narrow minded and often mention about their client work in some attempt to *seem* professional.

    My personal stance is that whether it is personal, or 'client' work you should always roll out the best possible code. Otherwise you get in to bad habits, look over things and start doing a generally poor job. It comes back down to 'regex wouldn't have taken that much longer than explode in this situation'.

    It's a very bizarre stance one does have.
    Last edited by Source; 08-06-2010 at 03:53 PM.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •