Skip to main content

Home/ PHP Programming/ Group items tagged To

Rss Feed Group items tagged

Sarah HL

ongoing · Test-Driven Heresy - 0 views

  • As a profession, we do a lot more software maintenance than we do greenfield development.
  • the deep-TDD rules: ¶ Never write code until you have a failing test. Never write any more code than is necessary to un-fail the test.
  • we do way more maintenance than initial development. And in my experience, the first-cut release of any nontrivial software is pretty well crap.
  • ...38 more annotations...
  • But to do that well, you absolutely must have enough test coverage that you just aren’t afraid to rip your code’s guts out
  • I always end up sketching in a few classes and then tearing them up and re-sketching, and after a few iterations I’m starting to have a feeling for X and Y.
  • I freely admit that this is not really truly TDD
  • once you’re into maintenance mode, there are really no excuses. Because you really know what all your X’s and Y’s are
  • Writing the tests points out all the mistakes you might make in signatures, prerequisites, etc. If the tests are too hard to make then you know that your API will be too hard to use, you're doing it completely wrong, and may as well pause for a rethink.
  • While the approach you advocate makes sense, it does require professionalism, not just from the developer but from management too.
  • the person left to maintain the code isn't the person who wrote it, leaving the maintainer with an unholy mess to untangle. Getting unit tests into such code is a monumental task.
  • he failure to address how unit tests can be introduced to an existing non unit-test codebase. (i.e. go from non-TDD to TDD)
  • I feel the TDD community only wants to focus on greenfield projects and has ignored maintenance/legacy issues. Which is strange when as you say code spends most of it's time in maintenance
  • The thing is that as long as the project is small you really don't see the benefits of TDD. I've done a couple of small projects and never had to go back to them ever again
  • Never use mocks unless you are mocking an interface that will almost never change
  • You are writing the client code (in the form of a test) so you are thinking how the worker code will be used. What is its public interface and what do you want it to do when it's called
  • From: Tathagata Chakraborty (Jun 24 2009, at 07:31)TDD is useful in another situation - in a commercial setting and when detailed specification documents have already been created by say a technical expert/architect. In this case you don't have to do a lot of designing while coding, so you can start off with the test cases.
  • writing the tests *first* is that it helps keep your code focused on exactly what it's meant to do, and no more
  • When work on production code begins, most of the code should fall into the categories of things that are not to be tested.
  • In theory, TDD is a great idea. The problem with TDD can be expressed in one word: money.
  • One approach to the unknown X and Y problem that I've been using recently has been to pretend that class X has been written already, and then write code that uses this pretend X object/API. I usually write this directly in the file that will become my unit test. Since X doesn't exist, I'm allowed to call whatever methods I want and pretend it all works. Once I'm satisfied with how it all looks, I cut and paste everything into a bunch of failing tests.
  • I get really bored adding tests to code that already runs
  • the seductive TDD trap
  • religious zealots
  • There is nothing wrong with building tests after you have built your product.
  • that goes a long way towards taking software development from a form of artisanal craftsmanship to a real engineering profession.
  • using tests to drive development cripples innovation, dramatically slows development
  • It always seem to me to be a codified form of reverse engineering, or at least a way to force the programmers into looking at their code from two separate angles at the same time.
  • If you're just adding tests at the end, then it's normal unit-testing, isn't it?
  • I do realize that this type of exercise might help younger coders in getting better structure, they do often rush in too quickly and focus more on the instructions than the abstractions.
  • TDD is test-driven *design*
  • He said he didn't write tests in cases where it would have taken him several hours to get a working test for a small piece of code.
  • In some applications, objects are self-contained, activities are sequential, and algorithms are tricky
  • I've seen cases where people have wrecked the architecture of systems in the name of making them testable... But have never written the tests.
  • Yes, it's possible to make peace with testability, and in the best situation, testability can improve the architecture of a program, but it can also lead people away from highly reliable and maintainable KISS approaches.
  • Like any infrastructure, it is always beneficial to provide unit testing. The most benefit is derived from installing it as early on in the project as possible.
  • The value of an untested feature, to a client, is ... zero. So, it doesn't matter how many of these you have rattled off in the past week, your net throughput is effectively... zero."
  • You can see in this thread the word "professionalism" (substitute "morality" with little gain/loss of substance) and even "sin" (used in jest, but not really!)
  • if I delay writing unit tests until after all the units are working together then because the system "already works" my subconscious enthusiasm for writing unit tests falls markedly, and so their quality and coverage fall
  • Experience teaches that if I generate that output by hand (1) it takes *much* longer (2) I almost always get it wrong. So I often write the code, get its output, carefully check it (really...) and then use it as the correct result.
  • My main objections to TDD are: 1) it promotes micro-design over macro-design and 2) it's hard to apply in practice (i.e. for any code that is not a bowling card calculator or a stack).
  • the tests are just a persistent artifact of the exploratory coding I've already done.
Sarah HL

Building semantic Web CRUD operations using PHP - 0 views

  • When developing a Web application, it's standard practice to create a database structure on which server-side code is placed for the logic and UI layers. To connect to the database, the server-side code needs to do some basic creating, updating, deleting, and — most importantly — reading of records.
    • Sarah HL
       
      Interet du CRUD
  • SPARQL — Simple Protocol and RDF Query Language
    • Sarah HL
       
      PHP works with SPARQK to implement CRUD
  • Why move from SQL to SPARQL? There are many reasons why you would want to move from SQL to SPARQL. The details extend beyond the scope of this article, but you could be motivated by the following points: You want a more distributed data solution. You want to expose your data on the Web for people to use and link to. You may find Node-Arc-Node relationships (triple) easier to understand than relational database models. You may want to understand your data in a pure object-oriented fashion to work with an OOP paradigm (PHP V5 and later supports OOP). You want to build generic agents that can connect to data sources on the Web.
    • Sarah HL
       
      Interest of SPARQL
  •  
    "When developing a Web application, it's standard practice to create a database structure on which server-side code is placed for the logic and UI layers. To connect to the database, the server-side code needs to do some basic creating, updating, deleting
Jungle Jar

JungleJar | Development Tutorial: Creating 301 Re-directs - 0 views

  •  
    From time to time you'll probably want to send a website visitor who tries to access a page that has moved, been deleted, etc to a brand spanking new page of which quite possibly will have the content they were looking for. In this article I'll introduce you to the 301 re-direct, show you how to create one, and you'll see why sometimes just depending on the 404 page isn't practical. I'll also show you various methods to create one by using PHP, ASP, and HTML.
Jungle Jar

JungleJar | Looking at Wordpress Custom Fields and Images Further - 0 views

  •  
    You may remember a previous article I wrote here on JungleJar.com called Using Custom Fields To Post Your Images, but if not, I'm going to reintroduce a few of the code snippets and methods I wrote about in the tutorial about how to save and display image data from custom fields within Wordpress. In this article I'm also going to cover a few of the small yet robust code block methods I myself tend to practice quite a bit that I didn't previously touch on. So, if you're looking for a solid tutorial on how to use Wordpress Custom Fields to display blog post thumbnails in an easy and flexible manner, then this article is for you.
Raúl - [^BgTA^]

30+ Firefox Add-ons for Web Developers & Designers - 0 views

  •  
    Las 30 mejores extensiones para Firefox:


    Aardvark - A cool extension for web developers and designers, allows them to view CSS attributes, id, class by highlighting page element individually. chromEdit - Alter the appearance of any page by editing CSS and Javascript files with this extension. CSSMate - Firefox extension to edit CSS files.
    CSS validator - Check the validity of your webpage using this CSS validator extension. CSSViewer - See the CSS properties of page elements with this extension.
    EditCSS - Play around with loaded CSS, Web Developer extension also provides this functionality.
    IE Tab - Designers and developers can view their CSS projects on Internet Explorer using this extension.
    Style Sheet Chooser II - Users can pick and choose alternate style sheets for a website. FireBug - A console for debugging JavaScript, HTML, and Ajax code snippets. HTML Validator - Cool extension to validate web pages with HTML standards of W3C. JavaScript Debugger - JavaScript debugging extension enables a strong debugging environment.

melvinahebert

Barclays To Host Blockchains Hackathon To Assist Contracts Processing In Derivatives Ma... - 0 views

  •  
    Barclays, the U.K. banking behemoth, is challenging Barclays To Host Blockchains Hackathon developers to assist refurbish the worldwide derivatives market next month at a hackathon. Disclosed to the media this week, DerivHack will take place at Barclays' Rise accelerator spaces at the same time in New York and London on September 20 and 21, 2018. The ISDA (International Swaps and Derivatives Association), Thomson Reuters, and Deloitte are co-sponsoring the hackathon.
Justin Pierce

The Most Excellent Bookkeeping Services - 1 views

When I was still single, I had all the time to manage my gift shop. But when I got married a year ago, I found it really hard to give equal attention to my business as well as to my roles as a wife...

started by Justin Pierce on 14 Feb 13 no follow-up yet
fastidioustec

Custom Web Application Development - Tips for Utilising Ecommerce Web Design Development - 0 views

  •  
    Each business faces unique challenges during its growth and web application development. This could depend on the type of business, to begin with. Those that sell physical products as opposed to services may wish to look into how ecommerce web design development could help boost their sales. The majority of consumers today shop online, finding it to be far cheaper and more convenient than going to a brick and mortar shop.
Justin Pierce

Managing Finances Gets Easier - 1 views

I am totally worthless when it comes to bookkeeping. I know most of it is number crunching, and that is the problem. I am not good at numbers. I am a business owner, and it might surprise you how I...

started by Justin Pierce on 27 Nov 12 no follow-up yet
paul silmonet

Instant Fix Slow Computer Solutions - 0 views

I bought a brand new PC with good specifications just last month. But only three weeks of use, I noticed that my PC froze and slowed down a bit. For the next three days, it continued to slow down. ...

Fix Slow Computer PHP programming framework open source web development webdesign MVC design mysql

started by paul silmonet on 08 Jun 11 no follow-up yet
James Stewart

Fast and Accurate Computer Help to the Rescue - 1 views

I was about to start my presentation when my computer to hung up on me. It was really a big inconvenience for me, not to mention very embarrassing. Good thing I was able to renew my subscription to...

computer technical help

started by James Stewart on 13 Oct 11 no follow-up yet
qualitypoint Tech

Adding piece of PHP code in all files within a sub-folder - 4 views

  •  
    In this post I will explain about how to add piece of php code in all files (including new files to be added) within a particular sub-folder in Apache server hosting environment. Let me explain why we need to add piece of php code in all files within a folder.
  •  
    I wanted to read it, but I won't, because Chromium blocked it and gave me a warning that the site hosts malware... just to let you know.
  •  
    Bart Deruyter Thanks for your note, now it should be fine.we removed unwanted external links.
Kashif Mehmood Mughal

35 Really Useful PHP Tutorials And Development Techniques | Smashing Buzz - 2 views

  •  
    PHP is the most popular and widely accepted server side scripting language among developers due to its easy to learn nature, free of cost and its large ever increasing helpful community, we usually seen in wordpress blog platforms, wordpress blogs totally build in PHP language. Today we presenting first time PHP tutorials roundup which are fully contained helping techniques and tips of most useful language PHP, It is the widely-used, free, and efficient alternative to competitors such as Microsoft's tools, every web developer know PHP most suited language for web development and can be embedded directly into the HTML, you can idea when ever you write code about that syntax is very similar to Perl and C language.
samantha armstrong

FixComputerpProblemsSite Surely Knows How to Fix Computer Problems! - 1 views

I was having problems with my laptop before. Good thing FixComputerpProblemsSite helped me fix it. And they are really the experts when it comes to solving any computer related issues. They can eas...

fix computer problems PHP programming framework open source web development MVC webdesign design mysql

started by samantha armstrong on 07 Jun 11 no follow-up yet
Justin Pierce

Enjoy An Excellent Bookkeeping Service - 1 views

It is a small grocery with just 4 staff that I started 6 months ago. I thought I can smoothly run it on my own. But then I noticed that I always encounter troubles in doing the payroll and other mo...

started by Justin Pierce on 28 Dec 12 no follow-up yet
qualitypoint Tech

Google Map API - A Powerful and Free way to add value for your web applications. - 4 views

  •  
    Google Maps is getting more popular as it is helping people to know the places and to get directions easily. Google is adding lot of information and satellite images of many places in the world to make the Google Map more useful.
sloansteddi

How to use PHP and PEAR MDB2 (Tutorial) | David and Katherine Goodwin - 0 views

    • sloansteddi
       
      Prepare takes the $sql (with '?'s where data will go), along with the TYPES (array) of data to prepare the sql for, and a 3rd paramater for manipulating or result-getting (see next paragraph). It assigns this to $prepared_statement. Another array is created with the data (in the same order as the types, of course), and the RESULT is aquired by running the execute() method on the $prepared_statement object, passing the execute method the "$data" array to fill in the '?'s After this do everything as normal.
  • column = ?
  • id = ?
  • ...1 more annotation...
  • I have a feeling that MDB2 lower cases all field names - so you'll probably need : echo $row['name'] A good idea would be to print_r($row) or similar, to see what's in it
  •  
    A great walk through on getting started with MDB2
Sarah HL

PHP Worst Practices at blog.phpdeveloper.org - 0 views

  • Beware the Outsiders
  • Sure, you could cobble together your own library to add that feature and yes, it might integrate excellently with your code, but what does that gain you? One of the points of Open Source development is to share your knowledge with the rest of the community.
  • Unplanification
  • ...8 more annotations...
  • This would be the combined voices of everyone in your past that tried to teach you the mantra: “Plan First, Code Later”.
  • The Documentation Wasteland
  • If you’re writing your code without any sort of documentation, you’re dooming you and possibly future maintainers of the code into many a pointless search to try to figure out why method a() returns two completely different value types depending on which parameters it’s given.
  • ets you know the “why” instead of just the “how” the code gives you
  • You’d be surprised how often you’ll find yourself referring to it once it’s reliable.
  • Free Your Mind
  • You, as a developer, know that there’s always more than one way to solve a problem.
  • Just like ‘anti patterns’, who are an important read as well, ‘worst practices’ help developers avoid mistakes.
jameswaltz

Desktop Support to Keep My PC Running Fast - 1 views

I have been subscribing to desktop support from OnlineDesktopSupport for almost a year already. I dit it because I need to keep my PC running fast. If I have a slow computer, I will not be able to ...

desktop support

started by jameswaltz on 12 Sep 11 no follow-up yet
shai edrote

They Are the Best Computer Tech Specialists - 1 views

I called Fix Slow Computer Today because I wanted them to fix slow computer fast. I need their expert computer tech specialist to help me with my slow PC problem. I heard they are the best and trus...

Fix Slow Computer

started by shai edrote on 13 Jul 11 no follow-up yet
1 - 20 of 263 Next › Last »
Showing 20 items per page