e_i_pi's Profile User Rating: *****

Reputation: 810 Master
Group:
Mentors
Active Posts:
1,729 (0.76 per day)
Joined:
30-January 09
Profile Views:
51,088
Last Active:
User is offline Apr 19 2015 06:11 PM
Currently:
Offline

Previous Fields

Country:
AU
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Playstation
Your Car:
Mitsubishi
Dream Kudos:
75
Expert In:
Databases

Latest Visitors

Icon   e_i_pi has set their status

Posts I've Made

  1. In Topic: Returning an Array from a Function in Javascript.

    Posted 15 Apr 2015

    Firstly, the requirements of the question state that the input is a string with a space separating the first and last names, and that the returned value should be an array. This is a simple Javascript operation, and there is a function that does this for you, called split().

    In order to work out problems like this, you need to break them down into their components. The way I did this was:
    • Determine what the input output types were (input string, output array)
    • Determine what needed to be done to the input (split the string into words)
    • Searched for "javascript string functions" to see if there was an existing function that did this
    • If there isn't an existing function (or you don't want to look through all string functions), search for "javascript split string into words"

    This is how a lot of good developers code quickly. Sure, experience is important, and knowing exactly what the function is called is great, but knowing how to solve the problem is as important if not more so. Break your problem down into atomic parts. Solve each part in order. When you get stuck, search, and learn how and what to search for.
  2. In Topic: Sudden increase in Google Analytics bounce rate

    Posted 13 Apr 2015

    I think I've tracked the issue down to the Google Analytics javascript file being called twice during the period where bounce rate was low. I can't be sure, but I know I cleaned up an problem where it was called twice, and have confirmed that other people have observed the same symptoms.
  3. In Topic: Stored Procedure's place in programming

    Posted 7 Apr 2015

    At my current workplace we use stored procedures exclusively (excepting a particular application that is decades old and can't call SPs). There's upsides and downsides to this. Upsides are code separation (mmm warm fuzzy), the stored procs can be independently tested and developed, and if multiple services / applications call the stored proc, then you get the extra warm fuzzy of DRY. The downside is that it is very difficult for a developer to test out a proposed new / altered stored proc alongside their codebase without having the DBAs run it in a dev environment for them. The ultra suck downside is that it can incur a great deal of regression testing, and it can sometimes be difficult to identify all the apps that require regression testing, especially when you services calling services calling services, and have multiple source control systems, especially if you cannot string search via your source control client.

    My previous workplace had a mix of stored procs and ad hocs. I implemented stored procs across the entire BI reporting codebase, but the flagship app still used ad hocs, which (as a DBA) drove me insane, as new code releases to prod were sometimes not stress tested properly, and the whole thing fell down in a steaming heap. I wanted to get everything as stored procs so that database maintenance and upgrades were completely in the realm of the DBAs - if the devs needs to store more information or different information in the database, they could just tell the DBAs what parameters they were sending in for SELECTs, what parameters they wanted to use for CRUDS, and what format they wanted in return. This means the DBAs could work independently and change the schema of the database for optimisation purposes, with only unit tests required not end-to-end regression testing. I may have been naive, but that company was full of cowboys, and I was trying to Wyatt Earp some of it into order.

    I'm all for stored procs, so it may surprise you that on my website I exclusively use ad hoc queries, with the only stored procs being those that are called by triggers. The reason for this is one that hasn't been discussed in this thread yet, and that's the database engine you're using. Not all database engines gain (what is in my opinion) the greatest benefit of stored procs, which is a global cache of execution plans. MSSQL, Oracle and DB2 have globally cached execution plans for stored procs, meaning one connection can call the stored proc and generate the execution plan, and any subsequent connections utilise that execution plan on their calls. You don't get that on PostgreSQL (unless you use pgBouncer, which I won't go into details about), nor MySQL. For the codebase on my site, it's easier for me to have all the SQL ad hoc right now - I may change my opinion in the future, but this at least gives you another point to consider.
  4. In Topic: jQuery not working

    Posted 1 Apr 2015

    What do you expect lines 3, 7 and 10 of your jQuery to do?
  5. In Topic: check radiobox from database php

    Posted 22 Mar 2015

    View PostDormilich, on 23 March 2015 - 06:34 AM, said:

    you could also fix that typo instead

    Hint: have a look at the page source to see what you're outputting, and then check that against the syntax you should use.

My Information

Member Title:
= -1
Age:
40 years old
Birthday:
June 24, 1974
Gender:
Location:
Australia
Years Programming:
4
Programming Languages:
HTML, XML, jQuery, PHP, SQL, MySQL, VBA, VBScript, PostgreSQL

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.artofwar.cc/

Comments

Page 1 of 1
  1. Photo

    cupidvogel Icon

    09 Jun 2012 - 11:30
    Ha ha, I really liked your "if(navigator.appName == 'Microsoft Internet Explorer')" theme!
  2. Photo

    Duckington Icon

    04 Apr 2012 - 00:57
    It's not live yet, still developing and then going into beta test. I haven't actually decided on a name yet, so no domain for it.
  3. Photo

    modi123_1 Icon

    13 Mar 2012 - 06:56
    Ha.. well good luck with it.. it's always a good butt of a joke.
  4. Photo

    RudiVisser Icon

    08 Mar 2012 - 15:20
    You know, I only just worked out what your avatar is. Love it!
  5. Photo

    RudiVisser Icon

    06 Sep 2011 - 00:37
    Thank you very much :-D
  6. Photo

    RudiVisser Icon

    06 Sep 2011 - 00:37
    Thank you very much :-D
  7. Photo

    e_i_pi Icon

    05 Sep 2011 - 22:15
    Ah thank you :) I'm a fan of minimalism, so I wwanted something nice and simple, plus you just can't go past red and black!
  8. Photo

    no2pencil Icon

    05 Sep 2011 - 19:52
    Love your avatar!
  9. Photo

    Sayid Ahmed Icon

    13 Jul 2011 - 14:02
    thanks for the add.
  10. Photo

    Dormilich Icon

    17 Feb 2011 - 13:25
    just wanted to congratulate for the funny thread title "OOP, PDOs, pain, tears".
Page 1 of 1