Welcome Guest, Not a member yet? Register   Sign In
faster/better development
#1

[eluser]introvert[/eluser]
Hello,

I want to improve my php codeigniter apps development.

I'd like to improve debugging (using echoes and that seems really retarded) and I want to have a system which could track all the changes in code.

1) debugging
Do you use any special library, technique which can make php development faster and more efficient?
Or you just define function log_me($str) ?

2) code updates
I know about SVN and GIT and i know git is getting more popular and its faster. Which one do you use and why?

Are there any plugins that will detect updated files, highlight them and upload to ftp server?

Any tips for better development are highly appreciated..

Maybe auto backup of the previous version before the new files are uploaded/upgraded as well?
Or any other CI related techniques that will make development easier?

Many thanks for help!
#2

[eluser]Buso[/eluser]
I would like to know which SVC to use too.. It would be cool if I don't have to write 20 commands to install it, and 20 more every time I want to use it.

Also, which IDE. I tried netbeans 6.8 but I can't configure it well.. For example, it turns tabs into spaces, which I find uncomfortable and inefficient.
#3

[eluser]tomcode[/eluser]
I am not a friend of IDE's, I prefer to keep it simple (TextMate and some trace functions).

As of version control, SVN sucks but the Mac client Versions is so efficient that I am still on it. I slowly try to get used to Git and Mercurial, but I do not see how I can control multiple projects in one view, guess I'll need to wait one or two years 'til someone offers a goog GUI Tool.
#4

[eluser]cahva[/eluser]
[quote author="Buso" date="1274327021"]
Also, which IDE. I tried netbeans 6.8 but I can't configure it well.. For example, it turns tabs into spaces, which I find uncomfortable and inefficient.[/quote]
Eh.. Just go to options and untick "Expand tabs to spaces". Thats it.

For the original questions I can warmly recommend Mercurial. I've tried them all but mercurial is the winner. I used Bazaar before but "accidently" started using Mercurial because CI developers changed from SVN->Mercurial. I first just wanted to get the latest version and update it too from time to time so I had to install mercurial. And Im glad I did Smile The other reason why I changed using mercurial was that Netbeans has great support for it: you'll see the changes realtime when editing. Can commit,push, pull etc. straight from the IDE. It just works. Bazaar is also cool, but netbeans doesnt have support for it so Mercurial it is..

For the FTP synchronize atleast WinSCP can synchronize. I myself use Directory Opus to replace whole shitty windows explorer(I just installed Windows 7 and its still shitty Smile ). Dopus has synchronise(not just ftp, everything). Dopus itself will improve everything if you use windows. Directory Opus was originally a filemanager for Amiga computers, which I loved(both Amiga and Dopus Wink ) and when it came to windows I started using it immediately as it gives the same freedom and usability as it did back in the Amiga days.

For the debugging part.. Well a good IDE like Netbeans will inform of typing errors in code, but for the actual debug I still use var_dump, print_r and CI's profiler. I have XDebug installed on my localhost but havent used it for its whole potential. Oh, and ofcourse you can use FirePHP, which enables you to output debug information straight to Firebug console.
#5

[eluser]Buso[/eluser]
I already tried that but doesn't seem to fix it. Will try again

edit: nope, doesn't work. I press tab, the indentation is created, but when I hit backspace, I have to do it twice.

the last time I used netbeans it had this problem with the whitespaces removal (it wasn't optional). Now this -.-
#6

[eluser]Udi[/eluser]
Hi,

Lately I've read a lot about continuous deployment, how different dev teams use it and what tools they have.
So I've decide to write an app to boost my productivity and specially the debugging and testing code fast.

As I thought about what exactly I need, I figured that having the unit-test class testing all my models and libraries [with predefined tests] will do the work for now,
And I'm trying to figure out the proper design for this feature. Maybe each model will have unitest() method that contains all the tests, and certain controller I run before big commit will go over all models and the unitest() method..
I still don't know, but once I'll find the best solution I'll write about it in my blog and release the code.

Now, I'll answer specifically your questions:
1. Still don't have any special technique for testing, I use the log and just testing the code while running it.
2. I don't recommend using SVN. Personally I started using BitBucket, and its quite good for me.

Quote:Are there any plugins that will detect updated files, highlight them and upload to ftp server?

Any tips for better development are highly appreciated..

Maybe auto backup of the previous version before the new files are uploaded/upgraded as well?
Or any other CI related techniques that will make development easier?
This is something I wanted to develop it the first place, but I figured its not that helpful for me and decided to go with the solution I wrote above.
#7

[eluser]cahva[/eluser]
[quote author="Buso" date="1274336300"]I already tried that but doesn't seem to fix it. Will try again

edit: nope, doesn't work. I press tab, the indentation is created, but when I hit backspace, I have to do it twice.

the last time I used netbeans it had this problem with the whitespaces removal (it wasn't optional). Now this -.-[/quote]

Oh.. I forgot, set "Number of spaces per indent" and "Tab size" to same. I have 4 set in both.
#8

[eluser]n0xie[/eluser]
[quote author="introvert" date="1274322699"]
1) debugging
Do you use any special library, technique which can make php development faster and more efficient?
Or you just define function log_me($str) ?
[/quote]
You have two types of logging. Error logging and 'general application' logging. Error loggers are good for Live environment. It should log when something that is supposed to work 'breaks'. General logging process flows, should give you some history in case something out of the ordinary occurs, without actually breaking the application.

When developing you should use tools like Xdebug to make sure your application works as expected. Unit tests and TDD are good in software development although I question the applicability in something as simple as a website, especially if you follow MVC principles. Most of my code that returns something to a controller (model, library, webservice) either returns the result, or FALSE. Either way it's something you won't catch easily with Unit tests.

[quote author="introvert" date="1274322699"]
2) code updates
I know about SVN and GIT and i know git is getting more popular and its faster. Which one do you use and why?
[/quote]
I would advice you to start learning git, even though the learning curve might be steep in the beginning. Git is gradually gaining more momentum, since it started a paradigm shift from single server SCM to distributed SCM. If you want to learn about the difference I would suggest you watch Linus Torvalds talk on git at Google. Coming from SVN I have to say, it took me a while to really 'get' git. It can be quite tricky and overwhelming at first, especially if you haven't worked with a VCS before or, in my case, you worked with a certain VCS too long. Some of the concerns are addressed on this excellent blog. What you notice is what most beginning git users go through. At first you hate it. As the blogger gets more familiar with git, his opinion slowly starts to change. Simply put, you can't use a tool like git and just use the basics. You have to really commit to learning how and why it does certain things (no pun intended). For insight read the series from that blogger, and especially this comment. I learnt more from that comment than all the tutorials online about git.
#9

[eluser]leonardteo[/eluser]
I was wondering about this too.

Does anyone use the debugging tools in NetBeans or Eclipse (coupled with XDebug I think?) with CI? For applications frameworks such as CI, I never got them to work properly in an IDE....and I just gave up after trying for half a day, so I'm just coding pretty much using Notepad++, and logging out errors as much as possible either using a text log file or to screen. I'm pretty sure that this methodology isn't as good as having a proper debugging environment, but I really haven't been able to get it working!

Regarding SVN, we use SubVersion not because it's better, but because I work mostly with web designers who can't even use Subversion properly (even with Mac Versions and its beautiful UI). Many apps such as DreamWeaver and Coda have built-in SubVersion support which is great for people who don't version control and don't want to. Sigh. I just don't think we could ever move to another version control as it took so much effort and ranting at everyone just to get people to check in/check out their files! Would love to hear of other experiences.

Leo
#10

[eluser]Udi[/eluser]
Take a look at phpUnderControl - http://www.phpundercontrol.org/




Theme © iAndrew 2016 - Forum software by © MyBB