11
DevRage
7y

I was think of using ajax to pass data from javascript to php because of some validation to my multiple checkbox, then before i go home the idea hit me to just use validation in php with some basic variable manipulation and if else, i just wasted 2 hours of searching just to arrived at a basic solution, i think it's much better to think before you code about what you want to do,but when i open my text editor i get distracted a lot.

Comments
  • 2
    I used to spend, but in The Office or with friends, every time I want to implement something new, I ask a colleague to sit next to me and judge my implementation (extreme programming), and the same, when we are Stuck on something
  • 0
    @llhbc next time i'll ask a friend for advice, i really spend 2 hours thinking about something so basic
  • 0
    @Cesar It may be that you think very broadly to solve the problem, divide it up to get a simple test, or a minimal entity and then communicate it with the rest of entities that solve the real problem
  • 0
    @llhbc ok thanks for the advice, i'll always consider it when coding
  • 0
    @Cesar But it's true, sometimes it's hard to focus on the user story
  • 0
    @llhbc yah sometimes you just forget what you want to do specifically
  • 0
    @Cesar things like Scrum and tdd help a lot not to lose the main objective
  • 0
    @llhbc i totally forgot tdd
  • 0
    @Cesar You do not have to use tdd, but test, simply help
  • 0
    You should validate on both the client AND the server. Client side validation helps the user spot mistakes, saving them time and a page load. Server side validation prevents bad data from getting into the DB.
  • 1
    Sometimes doing anything to distract your brain for a bit will work wonders when you return to the problem. I step outside with a coworker and just talk about movies or whatever is on Netflix. Anything to reset my brain rut. Fire alarms work well too. And naps.
Add Comment