Slashdot Mirror


User: fingal

fingal's activity in the archive.

Stories
0
Comments
130
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 130

  1. Refactoring on Organizing Source Code, Regardless of Language? · · Score: 5, Informative
    I would strongly recommend that one reads "Refactoring" (Martin Fowler - Addison-Wesley - 0-201-48567-2) (after reading Design Patterns) for the solid techniques that it introduces for clearly defined manipulations that change the shape of code without changing the functionality. However, even with this it doesn't completely resolve the issue of "when" that you raised, as summed up in the introduction to chapter 3 "Bad Smells in Code":-
    By now you have a good idea of how refactoring works. But just because you know how doesn't mean you know when. Deciding when to start refactoring, and when to stop, is just as important to refactoring as knowing how to operate the mechanics of a refactoring.

    Now comes the dilemma. It is easy to explain to you how to delete an instance variable or create a hierarchy. These are simple matters. Trying to explain when you should do these things is not so cut-and-dried. Rather than appealing to some vague notion of programming aesthetics (which frankly is what we consultants usually do), I wanted something a bit more solid.
    I was mulling over this tricky issue when I visited Kent Beck in Zurich. Perhaps he was under the influence of the odors of his newborn daughter at the time, but he had come up with the notion describing the "when" of refactoring in terms of smells. "Smells" you say, " and that is supposed to be better than vague aesthetics?" Well, yes. We look at lots of code, written for projects that span the gamut from wildly successful to nearly dead. In doing so, we have learned to look for certain structures in the code that suggest (sometimes they scream for) the posibility of refactoring.

    One thing we won't try to do here is give you precise criteria for when a refactoring is overdue. In our experience no set of metrics rivals informed human intuition. What we will do is give you indications that ther is trouble that can be solved by a refactoring. You will have to develop your own sense of how many instance variables are too many instance variables and how many lines of code in a method are too many lines.

    The book then goes on to describe the various types of "abstract smells" and what sort of correctional techniques can be considered to correct them, for example:-

    Iappropriate Intimacy
    Sometimes classes become far too intimate and spend too much time delving in each others' private parts. We may not be prudes when it comes to people, but we think our classes should follow strict, puritan rules.

    Overintimate classes need to be broken up as lovers were in ancient days. Use
    Move Method and Move Field to seperate the pieces to reduce the intimacy. See whether you can arrange a Change Bidirectional Association to Unidirectional. If the classes do have common interests, use Extract Class to put the commonality in a safe place and make honest classes of them. Or use Hide Delegate to let another class act as a go-between.

    Inheritance often can lead to overintimacy. Subclasses are always going to know more about their parents than their parents would like them to know. If it's time to leave home, apply
    Replace Inheritance with Delegation.

    I have frequently found that just reading through this short (~15) collection of abstracted "smells" gives a very good way of supplementing the "experience" that you speak of and helping you to make decisions with the benefit of a) a bit of third party support in making these decisions and b) a clearly defined set of rules as to how to apply each of the refactorings including test cases to prove that the functionality has not been changed in the process and, more importantly, a clean roll-back procedure for those times when the olfactory senses get a little bit confused...

  2. Same idea, but without the laser... on Laser Powered Paper Plane Takes Flight · · Score: 4, Interesting

    Many, many, moons ago I got a job working here while I was doing my A levels and one of the things that they where working on was propulsion systems for extremely high speed planes. If my memory serves me (which is not guaranteed cos I was only humble code monkey and not privee to the finer arts of engineering theory and it was a long time ago), then they where planning to use conventional propulsion methods up to their maximum effective threshold and then start spraying fuel onto the trailing edge of the wings directly, which due to the intense heat and pressure due to the (already quite unfeasibly high) speed would spontaneously ignite thereby generating more thrust without all the hassles of trying to force an extremely unpredictable fluid down a tube at high speed. Absolutely no idea of whether or not they made any progress on this or whether or not I would be prepared to fly in one if they did...

  3. Re:nothing particularly groundbreaking about it on lowercase music · · Score: 2
    Anyone intersted in what's going on in computer music should look into these software packages: max/msp, reaktor, supercollider, melodyne, ableton live, absynth, Audiomulch. While I also use stuff like Reason, these programs are more "forward thinking" and non-traditional.

    I'll just drop another one into the list, namely PD. PD (or Pure Data if you prefer) is written by Miller Puckette who worked on Max, and has since re-written it as PD. Can be downloaded from here and there is a very useful site here.

    PD is particularly nice because as well as letting midi + audio flow between the blocks in a particular patch, it will also let you handle 3d graphics primitives thereby letting you create generative video as well as sound.

  4. koan pro (was Re:nothing particularly ground...) on lowercase music · · Score: 2
    One thing that Cage's performances had that lowercase music doesn't, however, is variability. Each Cage performance was slightly different. I would really welcome a movement such as this in popular music, where songs have variability of notes, measures, keys, or whatever an artist would like. It would make listening to the same song over and over on the radio much more interesting. And it's completely possible with today's technology.

    You should go and check out Koan Pro from sseyo which describes itself as "the award winning vector audio, interactive audio and generative music authoring system".

  5. Distribution source. on lowercase music · · Score: 3, Informative
    Hum, well the whole lowercase or glitch or click or whatever you want to call it seems to be getting a bit of a slagging in the comments above. Fair enough 'cos it is definately towards one of the extremes of musical genres and therefore will statistically attract less folk who actually like it.

    However, if you decide that you do actually like what is going on with this and want to track down recordings of this nature then I would recommend that you go and check out smallfish records (or even better drop in if you around the Shoreditch area of London). They've got about 18,000 records on-line at the moment with short reviews and (albeit very low quality) sound samples of them all and they specialise in the more obscure electronica. Also there is a mailing list available that automatically drops off details of the new releases on a weekly basis (~150/week).

  6. Anti-patterns in 1998 on Bitter Java · · Score: 5, Informative

    If folk are interested in the concept of modelling the "wrong" way to do things then I would also recommend reading Anti Patterns - Refactoring Software, Architectures and Projects in Crisis by William H Brown, Raphael C Malveau, Hays W "Skip" McCormick III & Thoma J Mowbray (ISBN 0-471-19713-0).

    This takes a slightly higher level look at the whole management of coding projects (although a lot of the patterns that are desribed are equally applicable to the low-level coding structure) and looks at common fallacies that are used by many teams as the "correct" way to do things. A knowledge of common mis-conceptions that have been proven not to work in the past (except in certain clearly defined "special cases") is invaluable in being able to spot the nascent structures before the get set in stone and the cost of re-factoring the structures becomes higher than the cost of living with them.

    Finally if people really want to get into this field I would also recommend Death March: The Complete Software Developer's Guide to Surviving 'Mission Impossible' Profects by Edward Yourdon which, if nothing else, serves as very reassuring purely from the fact that you know that many many other people have to deal with similar situations when project management goes really bad.

    Finally as food for thought for those posters who stated above that patterns (and specifically design patterns) are not useful, I'll take the liberty of quoting the preface to Anti Patterns:-

    AntiPatterns are fun to read and discuss with firends. But get serious! This book is about the truth of software technology and development. In it, we define what's really hapening in technology and on software projects, and what you can do about it. AntiPatterns identify those bad design concepts, technical approaches, and development practices that lead to poor-quality software and project failure. This book also explains how projects identified and avoided these problems to improve their designs and practices for software success.

    Can you handle the truth? The truth is surprisingly hard to comunicate, and often regarded as politically incorrect and undiplomatic. The truth does not make everybody happy. In order to make this exposition of our industry palatable, we resort to comedy wherever feasible; and it has been said that comedy is the most serious tragedy. The truth is that the state of software engineering today is a tragedy: Five out of six coprporate development projects are considered unsuccessful. [Johnson 95]. Most software systems that are delivered fall far short of the desired features and virtually every system is a stovepipe, unable to accommodate changing business needs.

    In trying to explain this universal lack of software success, we came to the conclusion that there are many more AntiPatterns in practice than design patterns. In Internet time, technology is changing so fast that the design patterns of yesterday are quickly becoming the AntiPatterns of today....
  7. Re:gnome-vfs? on Good SFTP Clients? · · Score: 4, Informative
    This is one of the reasons why I enjoy using KDE because of the kioslave named kio_fish. This lets you enter URLs of the style:-
    fish://<user>@<host>/path
    This means that you can securely connect to your remote server, browse the file system, open up a text file for editing (or a graphic file or whatever) with the appropriate GUI tool on the local desktop and then save it back to the remote filesystem completely transparently. Greatly reduces the pain of secure remote administration.
  8. Re:Digital Networks United Kingdom on Linux Laptop Recommendations for 2002? · · Score: 1

    Too true. In fact, if I was to be totally honest, then I would admit that I was using the AJP version of the box, but given the choice again I would probably go for the DNUK version just for the knowledge of not having to track down the various drivers for things + the knowledge that I could phone them up and get a sensible answer that doesn't involve downloading a new windows driver...

  9. Digital Networks United Kingdom on Linux Laptop Recommendations for 2002? · · Score: 2
    If you are not too fussed about the size (or weight) of your laptop, and are looking for a cheap(er) option, then you could do a lot worse than checking out Digital Networks United Kingdom. I'm currently using one of their Quadra 150 boxes which will ship with Red Hat or Mandrake pre-installed and configured (although I've since dropped SuSE onto mine).

    The only thing that doesn't work is the internal winmodem (although they will sell you and pre-configure a pcmcia modem) and the TV out. The box is 1G PIII and can be supplied with up to 1G of memory and has a very pleaant 1400x1024 TFT screen. My workstation has been sitting in a cupboard for some time now...

  10. Re:Cool technology on Start the Presses: Printable Circuits Nearly Ready · · Score: 2

    Does this mean that we are going to see the launch of an Obfuscated Circuit Board competition in the near future?

  11. More info on the colour version in Brussels... on Big Berlin Blinkenlichten · · Score: 5, Interesting

    much web crawling later, you should check out Marnix 2001 for the high budget alternative...

  12. Colour version in Brussels for the millenium. on Big Berlin Blinkenlichten · · Score: 3, Interesting

    I have a vague memory (aided and abetted by a fine bottle of Lagavullin) of new year 2000 seeing a similar thing in Brussels that was put into place on one of the bank headquarters there. This used two or three chunky colour changers per window and gave a resolution of about 50x20 if my memory serves me. Looked very pretty as well in full colour, but the choice of content wasn't nearly as cool as the Chaos lot.

  13. Re:You have to *get* it working first... on Making Linux Look Harder Than It Is · · Score: 4, Insightful

    I agree entirely about the learning curve of getting a system running. After having installed multiple versions of both windows and linux, I would prefer not to put a newbie through either one of these trials on unfamiliar hardware unless they knew what they were aiming for.

    There is also the learning curve associated with the usability of linux. Previously, people have always approached it from "learn the command line first and we'll deal with those GUI addons once you have the basics down". I personally can't think of a faster way to alienate a new user, especially if they have experience using a GUI based system.

    I recently upgraded my box from a tower that I've been using for the last 4 years to a much more powerful laptop so that I can travel and still work. As a result I donated the linux tower to the graphic designer in my company so that he could have a "play" and work out what was going on, but not really expecting him to get that involved (have you ever tried to move a designer of his beloved Mac?).

    As it turns out, he is currently using the box for everything other than Illustrator and Photoshop. And he is considering getting involved in the development process of Gimp and Sodipodi or Sketch as a non-programming contributor to the process so that he can switch completely. However, he didn't learn any shell commands or any incomprehensible alien languages to make this jump, but rather got given a configured tool that just worked and did the job.

    The nicest thing about the whole process is that he is now starting to get interested in those wierd terminal boxes that I tend to leave open and has started to get his head around methods that for me appear faster and more obvious but which for a Mac user are the very antithesis of useability. This would never have happened if I'd started him on shell scripting in console mode on day one.

  14. Ummm.... on Alpha-Based Samsung Linux Goodness · · Score: 3, Informative

    Would you care to have a read of here and then explain your car analogy again?

  15. Science Museum, London on Magnetic Fluid Art · · Score: 2

    IIRC, there is a demo of this fluid in the materials section of the Science Museum in London with a tray of the fluid and a variety of different shaped magnets (horseshoe, toroidal, bar etc) that you can press up against the bottom of the tray and make your own shapes like this. Very pleasant way to spend an afternoon...

  16. Re:why bother with the FAA? on Motel 6... Hundred Miles Up · · Score: 1

    Hmmm. If I was looking for reliable backup for my space missions, then I would be more likely to go and talk to our friends over in Russia who have over 1600 successful launches with Soyuz and have a nice production line turning them out at a rate of knots. Exactly how many clean launches with any single comparative platform can NASA claim?

  17. Re:why bother with the FAA? on Motel 6... Hundred Miles Up · · Score: 1

    ...and of course there are absolutely no customers outside the US and the US has absolutely no gun-toting warlords of its own. Nice to see we've got our nicely packaged world view all sorted out...

  18. Maybe we are looking at this the wrong way round. on Are Unix GUIs All Wrong? · · Score: 2
    Just been reading the posts and having a think and my initial reactions go along the lines of:-
    • Yes there is a problem with CLIs being a bit untransparent for newbies and therefore alienate them from the power of the operating system.
    • Yes it would be nice to be able to get graphical feedback from the tools that we all use (and love once we get used to) on the CLI.
    • No it would be a really bad idea to try and drop all this 'added functionality' into the tools because you run the risk of breaking/bloating something that really doesn't need it.
    So if we want to start to provide some added functionality to our existing CLI then it has to be some kind of wrapper around the existing tools. ie no recompilation of the tools, no dependance on external graphical libraries (whichever one is your own chosen 'true path'), and no compromise of the tools for the power users who have used them for years and would be up in arms if anybody changed them.
    What can we find out about a process that might be useful in a graphical pop-up thang? We know what processes are running by seeing what spawned what, we have all the usual system resources about how much memory/cpu etc that a process is using, but this still doesn't really tell us anything about the process.
    What would be really nice would be to know what is going into the process and what is coming out the other end of it. ie if I type:-
    tail -f /var/log/messages | grep kernel
    and I don't see anything, is that because syslogd has crashed or just that the kernel is quite happy? What would be nice would be some way to tap into the points between the processes and look at the communications between them. Suppose we rewrote the previous CL as:-
    tail -f /var/log/messages | monitorPipe | grep kernel
    where monitorPipe is a small process that is transparent as far as input --> output is concerned, but it then registers itself with your favourite graphics environment and then lets people query what is actually passing through the pipe. This query could be in terms of Display the output in a scrollable window, or Plot the average speed in CPS in a scrolling graph or whatever. It is no longer the responsibility of the process that is outputting or inputting this information to guess in advance what people might like to ask it, it only has to do what it was designed to do and do it well.
    The next thing to do is to try and sort out some way of getting your pipes to be aliased into 'enhanced pipes' depending on whether you are running your shell under a dial-up, or if you have provided an enhanced pipe that communicates with your environment of choice. Off the top of my head this would probably require some kind of patch to the shell or some kind of wrapper around the shell (enhanced xterm kind of thing?).
    Let's stick with the enhanced xterm that filters your input and 'enhances' it to give 'better' functionality. We would now be in a position where you could have a drop-down list beside your xterm listing the processes that are currently running, lets you look at the input/output of each process, maybe even some kind of folded in multi-stage diff across the various pipe plugins so that you can see what is actually changing.
    Other posts had talked about the need for pop-up lists for autocompletion. Again, just trap the "tab" key in situations where you think it might be going to auto-complete, pass the request onto the shell, get back the list of alternatives and pop up a widget. What is the problem?
    Basically what I am trying to say is that I feel it is a very bad mistake to assume that just because a certain tool (eg tail) doesn't give you the functionality that you want/need, that patching this tool is the place to insert the functionality. This way only leads to a massive fork of all the low level tools that people rely on to get their work done. Instead try and find a single higher level point to patch in your functionality and you should be able to make a much more extensible system.
  19. Re:FSF-like Label? on Information Doesn't Want To Be Free; People Want It · · Score: 3
    You don't need to but you are assuming the web is the best possible method for distributing files.

    Sorry, don't understand. Do you mean the web as the IP transmission protocol or the http protocol. Any information that is going to be sent anywhere is going to be going over the web is it not?

    While it is good for many things I do not think it is a very reliable source for distributing binaries.

    Again, slightly confused. If you mean reliable as in trusting that the binary that you think you are downloading is really what you wanted then I agree.

    A file-sharing approach allows you to mirror on a scale impossible to acheive with the web.

    Yes you can mirror the information in many places, but this gives you no guarantee over the bandwidth that the end user will get when they download the file. For all you know, the mirror that you happen to choose to download the file is going to be sitting on someone's box with a single ISDN connection and 10 other people already downloading and its going to crawl. However, if your central legal service is working, ie enough people are choosing to buy the music that the digital distributor is making money (and therefore by definition the record company and the artist are also making money) then they can invest in a controlled distributed network of servers that are all offering the same services located at the right places in the net to maximise bandwidth to the subnets that are currently choking (a la yahoo).

    The trick is to make digitally signed music that can be verified by the end-user as the original before downloading the music.

    only necessary if you don't trust the site. place the site on an https connection with a signed certificate and the overhead of having to sign all the files individually disappears and your operating costs go down (more money ultimately to the artist (hopefully)).

    Also I'm a geek and therefore it is in my nature to explore new possibilities. :)

    New possibilities are always good. The trick is to find the new possibility that enables people to fight against the major labels while giving people what they want (ie access to music). The only way to build a sustainable system against the creatures of chaos with their law suits is to make something that is so legally airtight and not open to abuse that it can grow to its logical conclusion without having to factor in $120,000,000 dollar fines (or whatever the figure was). If the model works, then there will be plenty of opportunities to geek out on distributed download systems within the umbrella of the parent company. I'm quite sure that if someone started an open source project to run the site which was secure then the distributors would welcome it with open arms (less in house costs, probably better product etc etc).

    Remember, when you write code, it is your choice as to what licence you release the code under. Same for musicians. All the artists at atrecordings must have given their permission to let their music be downloaded for free because they think that it is good for them and i totally respect that opinion. But, if an artist chooses to release their work under a 'closed' model then that is their right and your distribution system for 'open' works must be able to protect itself from license abuse.

    Personally I would like to see a situation where it makes economic sense for all concerned to go for the open model. Only time will tell if this is the case and the only way you are going to buy time is by keeping it legal long enough for the momentum to build up.

  20. Re:FSF-like Label? on Information Doesn't Want To Be Free; People Want It · · Score: 2

    If you are offering the music for free download, then why do you need to offer file sharing? All the music is available directly from the source so there is no need to let users upload files. If you are going to maintain quality control and free yourself from any legal hassles then you need to just supply the music that you know is legal and that you know has been encoded cleanly and so forth. The target then is to make it so that you have a wide enough range of music that you hold the attention of the public. How much music do you download a week? From a quick scan, they appear to have CDs from around over 70 labels with around 4 or 5 hundred artists. With this amount of music available (and it appears to be growing all the time), the sharing argument is relatively irrelevant.

  21. Re:FSF-like Label? on Information Doesn't Want To Be Free; People Want It · · Score: 2
    I personally don't mind paying for music, if it music that I like. I've worked in the music industry for 8 years as a bass player and as a sound engineer so I've had the opportunity to see the process from both sides of the fence and to be perfectly honest both sides stink at the moment. The music is currently too expensive and the artists do not get the benefits they deserve.

    However, don't place all existing record companies in the same categories. Smaller independant labels quite frequently do try their best to offer the best deal to the artists that they can, but they are currently fighting a losing battle against the majors because the record industry is geared to fast massive turnover of disposable music where people buy the currently hip tune each week and then move onto the next one. And who decides what is hip? The same people that control the advertising in the high street record chains and who dictate the playlists to the national radio stations and who also have interests in the distribution channels for the music: the major record labels.

    In order to beat the RIAA at their own game it is necessary to change the rules because the economic reality of running a small record label is that it is quite often impossible to give a good deal to the artists, no matter how much you want to. Recording albums and pressing albums costs money and without the distribution and exposure, you are not going to cover your costs. A politically sound label is absolutely no good if it is a bankrupt politically sound label.

    If atrecordings' business model works and the small and unheard of labels that they support sell more records than they would if they played the conventional game then you are in a position of power and you can afford to move some money back to the artists. Yes, a lot of people will download the mp3's and give nothing back, but if a large enough percentage of these people do purchase the music (if they like it), then everybody wins. Napster is never going to gain legal acceptance because people will always use it for distributing music that the labels (or artists) haven't given permission to be distributed, but if all the music is available directly from the labels themselves at no cost, then what is the advantage in Napster? And what can the major's do about it? Absolutely nothing. Who are they going to sue? And for what?

  22. Re:FSF-like Label? on Information Doesn't Want To Be Free; People Want It · · Score: 3
    This is not exactly what you are looking for, but I recently discovered an on-line music distributer for underground and electronic music named www.atrecordings.com. Not only do they sell CD's at lower than normal prices, but their entire catalogue is available for download for free in mp3 format. That's the whole cd's, not just 'sampler tracks'. Now as far as I can tell, this means that all the record labels for whom they have distribution rights to must have signed agreements with the company to permit the free distribution of their music. Time will tell if this business model works, but for me if this is ideal - why bother taking a 'risk' in a record shop buying something that you might not like when you can preview your sale at your own leisure.

    I really hope that more labels give permission for their music to be sold in this way (although I don't see the major's getting in on the act anytime soon), but they allready have distribution rights from labels such as Ninja Tune, Sub Rosa, Knitting Factory etc etc

    If this model does generate significant sales, then it will make the creation of your FreeMusic label considerably easier, because the distribution barriers come down and therefore you can rebalance your margins to a much more artist friendly status.

  23. Re:Poor frequency response? on Focusing Audio · · Score: 1
    It doesn't exactly say that the bottom-end stops at 400Hz, it just gives the dispersion patterns for 400Hz. What I would expect is that the tightness of the beamed sound would vary with frequency, getting wider as it moves down the frequency spectrum.

    They mention that the demonstration was performed with a John Coltrane saxophone solo, which although doesn't contain much bass, will definately not be described as "loud and clear" if you put a 400Hz HPF on the projection.

  24. KDE and Gnome integration with KParts on Helix Code Profiled in Boston Globe · · Score: 1
    interesting mail from on the whole integration thing available here
    There exist (yet unreleased) DCOP bindings for C. (I'm still in the process of cleaning up and fixing some last issues) . I hacked up a small example which does exactly what you are talking about: It uses DCOP to embed a small GTK application into a KDE shell. And yes, it works "over the wire" :-)
    looks like even if things are moving in the right sort of general direction...
  25. Slightly off-topic kde news... on Helix Code Profiled in Boston Globe · · Score: 2
    Just thought people might be interested to know that the new beta of kde has just been released and is available here.

    There is also a nice bit of flame war starting journalism about the whole thing available here. Interesting reading...