My News: TOP - Autos Intimate goods Chairs Underwear Ladies handbag Bracelets Sportswear Top auto-moto furniture Dating Boots FDA Approved Pharmacy Boats Necklace Yachts Medical tests Suits Medicine news Building materials Top casino Rington Tunings Sale Auto Chronometer Blog Search the Web Cases Mobiles Cigarettes Cars auto-moto Ear rings Cigarette Green Card Information

    Follow me

     Volley Wiki Moves
    Filed under: — David @ 1:23 pm

    SourceForge has just added a project wiki service, so I have moved the Volley Wiki there from it’s old home here at this site. I had originally tried putting it on SourceForge (using phpWiki at the time), but found it to be too slow. Now that the speed is better, and it’s a built-in service, I decided it would be better to move it over. It’s best to have everything in one place.

    It was a bit of a tedious process, since I had to convert the pages from one wiki syntax to another, and Wikispaces doesn’t have all the formatting features that Tikiwiki does, specifically definition lists and text boxes. Comments were lost, but there weren’t very many.

    The original vision for Volley was for the server to be self-contained, but it looks more and more like it would need to integrate with other web-based services, mainly because it would be easier to get people to use it that way. That involves a lot of stuff that I don’t know enough about, so there’s the chicken and egg problem where I need to get more people on the team, but the project isn’t mature enough to attract anyone. I imagine a lot of open source projects suffer from this.

    Filed under: — David @ 10:23 pm

    I’ve decided to make it a goal to remove the use of ACCELA in Volley. It’s weird in a way to say I don’t want one of my open source projects to be used in my other open source project, but I think overall it’s better this way for a couple of reasons.

    First, there are some things that ACCELA is being used for which needs to be replaced with something cross-platform-friendly - specifically, string handling and XML parsing. Both of these can be replaced with libxml, which is not only a good cross-platform XML library, but it’s also built in to Mac OS X. (It’s kind of an outdated version, but I haven’t had any problems so far.) Since the client is being rewritten in Cocoa, most of the remaining Carbon-based code is related to handling files and folders, and that can be redone with Cocoa calls too. The plugin loading code won’t change though, because Cocoa’s NSBundle doesn’t have an equivalent for CFBundleGetFunctionPointerForName.

    Second, I think it helps if I avoid dependencies. Ideally you should be able to download the source code of an open source project and just build it. Requiring additional steps, like grabbing another library, complicates the process, making it easier to mess up and making it harder to attract more developers to the project. Having an “it just works” quality is a very attractive feature, I think.

    This is a bit ironic since I’ve just added a dependency on boost, but that’s a popular library so I think that’s more acceptable.

    This is also why I didn’t use ACCELA in XVG, although I could have - the Core Graphics wrappers would have been useful. But I think it actually wouldn’t have made a big difference, and limitations in Objective-C++ might have gotten in the way (especially in regards to having a C++ class as a data member of an Objective-C object). Plus in a way it’s nice to stick with the raw C functions, so I can remember how they work.

     Overactive test
    Filed under: — David @ 9:07 am

    At first I thought that boost read-write mutex problem was affecting the Volley server: there was an error when the server would exit after running the tests. So I converted all the read-write mutexes to regular ones, but the problem persisted. Oh well, I probably needed to make that change anyway.

    It turned out the problem was brought up because of a test I had added to make sure connecting to the server works - it didn’t because of an endian problem. From the beginning (that is, before the whole MacIntel thing) I tried to have the proper endian conversions in place in Volley just in case I managed to get someone interested in porting it to Windows. Well, good thing I did, though I missed a couple of spots. Good thing I added that test, too, since it tested more than I intended it to.

    Anyway, because the test was opening and closing the connection so fast, it raised some thread synchronization issues because one thread started handling the disconnect before another finished handling the connect. Plus, since this was the last test, right about then the main thread would start to shut everything down, which meant closing down all connections. So there were three different threads trying to operate on this one connection all at the same time.

    It may sound strange that the connect and disconnect are handled on different threads, but what happens is there is one thread that handles all new connections, and it responds to a new connection by making a new thread for it. That new thread then handles the disconnect. This overlap is a little hard to avoid because of the asynchronous nature of networking.

    Threading is nice because it helps you encapsulate the different tasks in an program. The problem, as demonstrated, is keeping the threads from running into each other. It’s such an easy mistake to make because you tend to think of the tasks (like opening or closing a connection) as whole units, and then without realizing it you assume that this separation will be inherent in your program as well. But it’s not; you have to explicitly delineate these things.

    In a way that’s one of the things I like about programming. It forces you to constantly question your assumptions.

     Now I don’t feel so bad
    Filed under: — David @ 9:34 pm

    So, way back when, I started putting boost’s thread classes into Volley, replacing the ones I had written. As I recall, part of the reason I did so, in addition to wanting to be all standard and cross-platform, was that my implementation of a read-write mutex wasn’t working. Now I’ve found that in the latest boost update (1.33.1, released 12/5/05) excludes their read-write mutex because it also had problems. So on one hand I feel better about not having been able to solve the problem, but on the other hand I’m still left without a solution.

    Fortunately this isn’t a huge deal. A regular mutex can be used instead, but it’s less efficient, because even reading can only be done by one thread at a time. Logically that restriction shouldn’t be necessary, since it doesn’t matter how many threads are reading as long as the data doesn’t change. But when you have a thread that wants to change the data, that’s harder to manage than it sounds.

    I went back to Volley because it’s been too long since I even committed any code, and ACCELA doesn’t need so much attention right now. I also need to transition Volley over to Subversion, and I think I’ll start from scratch instead of importing the CVS repository. This will let me more easily reorganize the files, and it could use some cleanup. I’m going to cut out the OS 9 stuff entirely, and maybe even the Carbon client.

     More spam lockdowns
    Filed under: — David @ 10:30 pm

    So soon after removing my site’s forums, today I disabled guest comments in the Volley wiki. It had actually been surprisingly free of spam up until about a week ago, but then suddenly the spammers started attacking.

    The funny thing is that in many of the spam comments, they got the markup wrong so the links didn’t work. They ended up appending their intended URL to the wiki’s own URL, creating a bunch of 404 errors in my server logs. That’s how the spam was brought to my attention. If they had formatted their spam properly it would have taken me longer to discover it.

    Tikiwki doesn’t have particularly good features for dealing with spam, at least not the slightly outdated version I have installed. So to find the affected pages, I used Google to search my site for things like “buy online”, “nice site” (the phrase that screams “spam comment”), or various drug names - the very keywords they were trying to grab. It was fun to take Google and use it as an anti-spam tool.

     Scripting Volley
    Filed under: — David @ 6:56 pm

    I forget what got me onto this subject, but lately I’ve been thinking about approaches to adding scripting support to Volley. Now this isn’t a subject that I’m much of an expert on, but it does seem like something that other people could find a lot of uses for. Plus, Volley is supposed to be flexible and multi-purpose, and that goes with the scripting concept very well.

    Based on my limited expertise in scripting, I’ve chosen JavaScript as the one to investigate - inspired largely by its use in Konfabulator, a.k.a the Yahoo! Widget Engine. In fact, I’d probably use the same implementation: Mozilla’s SpiderMonkey. I looked briefly at JavaScriptCore, the engine that Safari uses, but found that it’s nowhere near as well-documented as SpiderMonkey. Plus, someone is already doing a C++ wrapper library for the SpiderMonkey API.

    The next question is, what should the scripting interface look like? The simplest and most obvious answer is to provide an interface to the core messaging interface, plus the other constructs like data pods and data pipes. This also has the advantage that it can be implemented as a self-contained plugin, and such a plugin would be useable in both the client and the server.

    On the other hand, I still only have a vague idea of what people (users and administrators) might want to do with scripting. Plus I still need to get back to getting the Cocoa client back on its feet. The problem is I have all these Justice Leauge DVDs to go through.

    Filed under: — David @ 2:22 pm

    I was searching for literature relating to accountability in Internet protocols, and found an interesting article on Challenges in Anti-Spam Efforts. It’s basically a summary of the spam-fighting situation, so there’s nothing really new there, but I like how it mentions accountability as an angle for tackling the problem. That seems to be to be one of the basic problems with the Internet when it comes to issues like spam: there is no accountability built into the system, and people are now flailing trying to figure out ways to tack it on.

    I got interested in the spam issue not only because I get spam every day, but because of Volley. As I thought about how mail might work in that system, it occurred to me that having Volley servers exchange mail with each other (using a custom protocol) provides an opportunity for avoiding spam because it sets up a new system where spam doesn’t exist yet. If you, as a Volley server admin, start receiving spam from another server, then you set your server to stop accepting mail from it. I have always imagined Volley working on the same scale as Hotline, with mostly individuals running their own servers. This kind of micromanagement would be a reasonable thing to expect in that context: a world where servers are managed by administrators that are responsible and accountable. If they do not live up to that standard, then those who do will shut them out of what effectively becomes a trust network.

    Of course all this is still theoretical until Volley 1.0 happens. I need to find myelf a duplicator ray so I can work on these ideas while still holding down a day job.

     Open Source and Diligence
    Filed under: — David @ 2:10 pm

    XVG was my first new open source project in a few years, and I’ve taken a somewhat different approach with it than I did with the others (at least at first). I’m going by two basic rules: work on one thing at a time, and keep the repository in a state where someone can build the application and run it at any time. Unit tests definitely help with that second one. I’m also trying to be responsible about maintaining XVG as an open source project. I try to keep in mind that it is basically on display to the whole world (even if, in practice, not many people are looking at it right now), so I should think of it as a front lawn instead of as a closet.

    ACCELA wasn’t as easy to work on under those rules, since for the most part it’s a collection of mostly independent parts. There may still be a few things that are not well tested; I never wrote a test/demo app to test everything. I mainly left that for features that were more my own code than just simple wrappers: the auto toolbar and the document classes.

    Volley, on the other hand, definitely would benefit from those practices, but when I started it I didn’t quite have the habits of focused development that I’m trying to adhere to now. For example, a while back I made a fairly major change - switching over to the boost classes for threads - but I have yet to check that in because I started working on other things at the same time, and I never quite got everything fully working. I didn’t really get into the concept of unit tests until Xcode 2 made it convenient. One of these days I need to get back and finalize these changes; perhaps I should plan to do that after the first release of XVG.

    There is always the temptation to decide I’m bored of working on a feature, and skip over to something else instead. But then I end up with a mess of half-completed features. I caught myself going down that road just recently with XVG. I had started to implement drawing and editing tools, and I had a chain of logic that led me to start implementing the Bring to Front/Send to Back commands.

    You see, to be able to switch tools, I needed to have the tool palette item in the toolbar (since I plan to do that instead of a floating tool palette). But I wanted the window to look good, so there should be some other toolbar items too. The item ordering commands seemed like good candidates, so I started working on those. But once I had the code written for them, I remembered that I still hadn’t tackled the issue of Undo, which I would need not only for these new commands, but also for the recently-started editing tools, not to mention the inspector palette that’s been there for a while. So really Undo needed to be the next task; putting it off would only mean more work when the time came to adding it in to already-written commands.

    That’s why, if you were to look at the XVGView.m source file right now, you’d see all the written-but-untested item ordering commands commented out. For the sake of keeping things clean, I don’t want to leave anything in that hasn’t been reasonably tested, and it simply wasn’t the time to test those commands.

    These principles of unit tests and focused development appeal to me a lot, and I often think there are some good life lessons that can be extracted from them. These practices do not happen in isolation; when you develop good habits in one area of your life, it’s going to help you in others too. And of course, the same goes for bad habits.

    Focus is a good thing. It helps fight laziness, and it gives you a way to express that you care about what you’re doing. If your work on a project consists of randomly poking at various individual tasks, then you won’t get much satisfaction or progress. If you don’t actively demonstrate that you care about the project, you will come to care about it less. It will mean less to you because you haven’t given it meaning.

    Unit tests are a way of defining the goals and standards for a program. They give you a way to tell the computer what you expect out of the program, so that the computer can tell you if it lives up to those expectations. I only wish there were such a quick and easy way to run unit tests on my life, giving me a report of any ways in which I am not meeting my own goals and standards. Instead, I have to do it the old-fashioned way, through introspection and developing the good habits that defend me against the bad ones.

    This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

    Powered by WordPress

    Shareware Icons Games
    Topic - News Blogs: Bracelets auto-moto Chairs Blog Search the Web Top auto-moto Boats Autos Cases Intimate goods Necklace Trousers Underwear Top casino Sale Auto Building materials Evening dress Yachts Tunings Medicine news furniture Rington Replica Rolex Mobiles Rolex Replica Boots Ear rings Fashions Green Card Information Balans Cigarettes Medical tests Sport Betting Cars