I can’t believe that I had overlooked this application at first, but I’m glad that I finally started using it. So far, this is the best free Python IDE that I’ve found, and it’s a fantastic general text editor as well!
Here’s the official guide on how to set up Editra as a Python IDE:
My CS300 professor at Portland State University just wrote a fantastic blog post about things he commonly sees in student source code – it’s a great read and helpful for reflecting on your own code and best practices:
I’ve read quite a lot of student code over the years. Some of it is quite good. A lot of it is full of predictable badnesses. These notes attempt to enumerate some of this badness, so that you may avoid it.
This is pretty C-centric in its current form. However, many of its lessons are multilingual. This is a living document, so don’t expect it to be the same next time you look at it. In particular, the numbering may change if something gets inserted in the middle. It is revisioned automatically by Drupal, so feel free to point at a particular revision if you care.
And, my own pride and joy (this damn code took me forever, only because I had to do all sorts of research and testing with Regex in C#), the function that will fix relative paths in the combined CSS files by replacing them with absolute paths based on your application root:
/// CSS Only: Replaces relative paths in url(...) properties within the specified script.
/// <param name="scriptBody">The pre-combined script, passed from CombineScripts().</param>
/// <param name="scriptPath">The relative path where scripts are located (ex: ~/CSS/).</param>
/// <param name="applicationPath">The absolute application path. (ex: /ApplicationRoot).</param>
private static String FixRelativePaths(String scriptBody, String scriptPath, String applicationPath)
scriptPath = VirtualPathUtility.AppendTrailingSlash(scriptPath);
String relativeRoot = VirtualPathUtility.Combine(applicationPath, scriptPath);
Regex cssUrlReference = new Regex("(?<=url\\()(.+?)(?=\\))", RegexOptions.Singleline);
Regex invalidPathChars = new Regex("[ '\"]+", RegexOptions.Singleline);
MatchCollection urlMatches = cssUrlReference.Matches(scriptBody);
foreach (Match m in urlMatches)
String oldPath = Regex.Replace(m.Value, "[ '\"]+", "");
String newPath = VirtualPathUtility.Combine(relativeRoot, oldPath);
newPath = VirtualPathUtility.ToAbsolute(newPath);
scriptBody = scriptBody.Replace(m.Value, newPath);
I’d love to read your comments and/or questions about this code, so please feel free to post your thoughts in the comments on this post.
I’ll try to get you the full meal deal on this code as soon as I can. =)
Until Microsoft come up with an official solution there is a working workaround for this problem.
This problem only appears to affect people who have not got Visual C++ Installed.
1.) Download VS90SP1-KB971092-x86.exe from here … http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=294de390-3c94-49fb-a014-9a38580e64cb
2.) Start the installation VS90SP1-KB971092-x86.exe
3.) Wait for the error message to come up – DO NOT CLOSE THE WINDOW!
4.) Copy the temp. folder where the patch has been unpacked to a new folder, for example onto your desktop.
5.) Close VS90SP1-KB971092-x86.exe that you started in 2.)
6.) Navigate to <drive>:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools and find vsvars32.bat.
7.) Change the permissions on the file to allow everyone to edit it.
8.) Start VS90SP1-KB971092-x86.msp from within the saved folder and the process should complete.
If you want to preserve whitespace within an HTML element (div/span) without using non-breaking spaces (and therefore breaking word-wrap), add the following property to the CSS style(s) for that element:
There are more options available for this property as well:
It’s also worth noting that Safari and Chrome (well, anything rendered with Webkit, it seems) have an excellent set of development tools built-in that are very similar to the functionality of Firebug in Firefox, and even IE8 is catching up to the game with its Developer Tools window/pane.
I agree with Ian, this program is excellent. Gives you some useful information for a change (and something you can do with it) when you get the message “Cannot delete <X>: It is being used by another person or program.”
If you’ve been using Subversion for source control, I’m sure you’ve heard of this client. If not, get it immediately. It rocks, and integrates exceptionally well with Windows Explorer. (Not to mention Visual Studio, via AnkhSVN or VisualSVN)
Since Internet Explorer is the scourge of the Interwebs that will never go away, it helps to be able to test your site in multiple versions of IE, and since only one version can be installed at a time (and since IE8 Compatibility Mode doesn’t really help at all), IETester is a good solution that lets you test IE5.5, IE6, IE7, and IE8 rendering engines in the same tabbed browser. Very cool.
…But, as my coworker mentioned, Internet Explorer is pretty invasive and modifies more on your system than just the rendering DLLs, so it’s a good idea to keep a spare VM running each flavor of IE as well. VMWare Player is the free version of VMWare Workstation, which will run pre-existing virtual machines, but can’t create new ones. Since that functionality is missing from VMWare Player, you can use this site to create your own virtual machines from scratch: EasyVMX! Virtual Machine Creator.
RedGate’s description says it best: “.NET Reflector enables you to easily view, navigate, and search through, the class hierarchies of .NET assemblies, even if you don’t have the code for them. With it, you can decompile and analyze .NET assemblies in C#, Visual Basic, and IL.”
Ian Hickman’s post (6 Free Tools that every Windows Programmer should Install) suggests Process Explorer alone, which is a superior Task Manager replacement, but I’ll extend it to suggest the whole Sysinternals Suite, since it comes with so many other great utilities and includes Process Explorer along with them. One of my favorite tools besides PE is AutoRuns, which is a msconfig.exe replacement that offers a much better look at your startup apps and services.
TortoiseSVN comes with its own diff tool, but I tend to end up using WinMerge instead because it does a great job with comparing local files or differing versions of a file in source control, and integrates seamlessly with TortoiseSVN.
I’m definitely a keyboard junkie, so anything I can do to keep my hands on the keyboard is a plus. Launchy is by far my favorite application launcher for that reason. All I have to do is hit Alt+Space (you can reassign the hotkey if you like), and it brings up a prompt that allows me to launch anything on my Start Menu, and do a number of other tasks as well (launch websites, perform quick calculations, etc.). Definitely saves me a ton of time.
Of the two apps listed above, I prefer Charles, which is a paid application, but I’ve listed Fiddler as a free alternative. Both apps are proxies that log traffic between your system and the server you’re debugging (even localhost) and both provide valuable debugging information that is particularly helpful when trying to debug web services. From the Charles website: “Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information).”
All three of the apps listed above are excellent full-featured text editors, but I prefer the feature set of EmEditor, which is a paid application. The killer feature that EmEditor provides which I haven’t yet found in either of the other editors is the Find *and Replace* in files. Notepad++ has a Find in Files option, but I haven’t found a Replace in Files function without opening up every single document and performing a replace in all open documents (info on that approach here: How To “Find And Replace” Words In Multiple Files).
Notepad2 doesn’t offer the same tabbed document interface that both EmEditor and Notepad++ offer, but it is an incredibly lightweight, and more importantly, self-contained executable that’s a perfect drop-in replacement for Windows Notepad (info on how to do this here: Replace Notepad with Notepad2).
Any of these apps offer syntax highlighting and are a great alternative to firing up Visual Studio when you need to make a quick edit (or on one of the *many* occasions when Visual Studio slows waaaaay down or locks up your system).
Also, I neglected to mention AutoHotkey since I haven’t used it as much as I probably could, but I can say that I’ve had a lot of luck with the AutoHotkey script iTunesAnywhere, which helps since I don’t have a keyboard with multimedia keys and for whatever godforsaken reason, iTunes *still* doesn’t natively support global hotkeys like Winamp does. (I’d switch back to Winamp, but I drank the Apple kool-aid and picked up an iPhone in January.)
Cool post with a lot of great history and font samples!
As a self proclaimed programmer/designer I enjoy not only the logical and practical things in life, but also the beautiful and well designed. And I find the greatest pleasure when these things converge to produce something extraordinary.One such thing is Typography. Typography is the art of language, the visualization of the spoken word. A medium by which non-verbal communication is made possible. And though I profess no expertise in this art, I have come to deeply appreciate it’s power and ability to convey the same message in so many different ways. Each with a unique feeling and style.
In 1956 Howard Kettler designed the typeface Courier. It was made for IBM’s new (and revolutionary) line of electric typewriters. Originally called “Messenger”, Courier is one of the earliest fixed-pitch (also known as Monospace) fonts, meaning each character takes up the same amount of space on a line; allowing for easy tabular alignment and legibility.
Courier was a hit, and as many made the transition from typewriter to computer, this classic typeface wasn’t far behind. It was included in all early Apple computers, and while creating the core fonts for Windows 3.1, Microsoft hired Monotype Typography to give Courier a makeover. And so Courier New was born, as a thinner and cleaner version of it’s former self.
Not without its typos, but quite a helpful article nonetheless… 😉
One of the common issues in data layer is avoiding duplicate rows from dataset or datatable. I saw many people are writing separate function and looping through the datatable to avoid the duplicates. There is more simple ways available in .Net but people are unaware about this. I thought of writing a blog about this because I saw many blogs which mislead the people from right path. Thers is no need of looping or no need of logic are required to avoid the duplicates.
Following single line of code will avoid the duplicate rows.
Ook! is a programming language designed for orang-utans. Ook! is essentially isomorphic to the well-known esoteric language BrainF***, but has even fewer syntax elements.
A programming language should be writable and readable by orang-utans.
To this end, the syntax should be simple, easy to remember, and not mention the word “monkey”.
Bananas are good.
If you are familiar with BrainF*** you can skip straight to the syntax elements section. Note that since Ook! is trivially isomorphic to BrainF***, it is well-established that Ook! is a Turing-complete programming language.
Memory Array and Pointer
Ook! uses a large array of integers as storage space, all initially set to zero. A Memory Pointer begins pointing at the first array cell.
Since the word “ook” can convey entire ideas, emotions, and abstract thoughts depending on the nuances of inflection, Ook! has no need of comments. The code itself serves perfectly well to describe in detail what it does and how it does it. Provided you are an orang-utan.
Ook! has only three distinct syntax elements:
These are combined into groups of two, and the various pair combinations specify commands. Programs must thus contain an even number of “Ook”s. Line breaks are ignored.
While coding in Java recently, I decided to do a little research to see if Java supported the #region directive (or something similar) and found a ton of articles knocking its usage as poor programming style.
Personally, I love the #region directive in C#, as it allows me to keep my code more organized (and yes, I am aware of the exisiting code-folding functionality in Visual Studio). In the files I work with, I’ve become pretty meticulous about organizing the code blocks into regions, partially because I like the organization, and partly because I was previously under the impression that it was good form to keep source files organized in this way. I use the following regions myself, generally:
(Anything class specific)
I agree with the sentiment in the articles I’ve read that it is *not* good practice to sweep bad code under the rug by hiding it from the developer in a folded #region, but I think that organizing relatively good code into regions like the ones I’ve mentioned above makes it a lot easier to get directly to the code I want to work on.
What do you think? I’m curious to see justifications for/against this directive, and as always, thanks for reading!
LoseThos is for programming as entertainment. It empowers programmers with kernel privilege because it’s fun. It allows full access to everything because it’s fun. It has no bureaucracy because it’s fun. It’s the way it is by choice because it’s fun. LoseThos is in no way a Windows or Linux wannabe — that would be pointless. LoseThos is not trying to win a prize for low resource usage or run on pathetic hardware. Low line count is a goal, though. It’s 100,000 lines of code including a 64-bit compiler, tools and a graphics library. It’s strictly 64-bit and could be configured to function with 32 Meg or less RAM, but who cares! Where do you get a x86_64 machine with less than 32 Meg RAM? With no multimedia, it’s hard to run out of memory on a modern home computer.
LoseThos was designed from scratch with a clean slate and has no compatibility with anything else. Source code is ASCII plus binary graphics data. It has a new language roughly based C/C++. It’s more than C and less than C++ so, maybe, it’s C+. I took every opportunity to improve things once I made a clean break with the past. That’s another reason LoseThos has value — it is innovative.
I started with a command line like this: Dir(“*.*”);
I added default parameters from C++: Dir();
I said, “parentheses are stupid.” Dir;
Now, I have a language which looks a little like pascal. It also doesn’t have a main() routine — any statement outside a function executes immediately, in order. The command line feeds straight into the compiler (not an interpreter) and it doesn’t have that bullshit errno crap for return values — command line commands are regular C+ functions.
This is just awesome – with Ctrl+I, you can perform a type-ahead search within Visual Studio, just like Firefox!
Again, my buddy Sairama to the rescue. Just when I think I’ve pretty much got VS.NET down solid (only being use it since Pre-Beta days, right?) I’m thrown a curve ball called incremental search. I guess I just assumed that a feature that was so cool in so many other editors would never make it into VS.NET. Silly me.
So, lest I be the most ignorant, fire up Visual Studio.NET, get some code in there, hit Ctrl-I and start typing. After you’ve found something, use F3 to Find Next. In the words of Chris Sells – It’s pure sex.
“So I was bored at work one day,” Graeme Job explains, “and wondered, what’s the most useless thing I could do with my time without actually doing anything. Then it hit me. I could use T-SQL to generate… Mandelbrot.”
Graeme continued, “Following is a single T-SQL SELECT statement that generates a text-representation of a Mandelbrot Set. The results are best viewed in text-mode.”
You can grab the code from The Daily WTF, and run it via SQL Server Management Studio. Of course, I tried it myself, and got this result:
I thought I’d thoroughly read this article, but upon reading it again today, I noticed a key point I’d missed. If you can’t upgrade your SVN client, do a fresh checkout with the older client. I’m going to have to try this now…
This client is too old to work with working copy ‘XXX’
The full error message is:
This client is too old to work with working copy ‘.’; please get a newer Subversion client.
You will get this error message once you have used a Subversion client linked with a higher Subversion version, and then try to execute a command with a Subversion client linked with an older version, e.g., you used an 1.4.x client on your working copy, and now you try an svn 1.3.x client on the same working copy.
The reason for this is that Subversion 1.4 and 1.5 upgrade the working copies transparently on every command. But once the working copy format is upgraded, older clients can’t access the working copy anymore because they don’t know the new format.
The only solution to ‘fix’ this is to upgrade whatever clien
I have no idea if The Manga Guide to Databases will be any good (the publisher sez, “In The Manga Guide to Databases, Tico the fairy teaches the Princess how to simplify her data management. We follow along as they design a relational database, understand the entity-relationship model, perform basic database operations, and delve into more advanced topics. Once the Princess is familiar with transactions and basic SQL statements, she can keep her data timely and accurate for the entire kingdom. Finally, Tico explains ways to make the database more efficient and secure, and they discuss methods for concurrency and replication.”) but I sure hope it’s the start of a trend. I want a manga guide to supersymmetry, the surplus labor theory of value, tensor calculus and many other elusive concepts.