2005-08-27 well, finally gone to a db
I had been talking about it for a while. It's finally happened. I have turned this site into a database driven content managed site. Just wait for further improvements and when the security has been added you should expect to see this available for download.
The main features provide the siteop to organise pages by paragraph. Soemthing that I feel is lacking from most blog sites, at least those that I ahve seen only allow you to store a blog entry as a element.
The requirements are usual mysql/php/apache, aside from that it's just 200-ish lines of php, occupying two tables in a database.
The benefits of this are only aparent when you think about how the data will change with the site. Currently most siteops will organise a site into elements that are handled by CSS, which is fair enough, but when the siteop decides to organise a part of the site into tables rather than paragraphs it could become a teadious job. Which is a db approach becomes useful, you can easily change the paragraph types, or add a new type which applies table, or even div formatting.
2005-08-27 fun with mono today
using System;
public class test
{
public test()
{
Console.WriteLine( "Hello World" );
}
static void Main()
{
new test();
}
}
To compile this simple program just do the following
$ mcs test.cs $ mono test.exe
Simple enough really, you might notice a couple of differences between mono cs code and java, the main method is static void main, and system.out.println is Console.WriteLine!
cs has destructor methods which java does not. There have been the odd instance when I have wanted to use destructor methods, in mono they're just the same as C++, make a new public method with ~ infront of the class name, and put all destruction code in there. I believed that they were ommited due to not knowing with the garbage collector will run, and you cannot be sure of the order that classes would be trash canned.
~test()
{
Console.WriteLine( "Good bye" );
}
All you need do is paste the above into the first example betwee nthe public test() method and the main() then save and run as you did the first example time.
2005-08-18 vb fun
More fun with VB. For those who are using this from a c#/java background will also found the following lacking:
while() { continue; ..
VB.NET version less than 8 will not have support for the continue keyword. Alternatives are If ... Then ... Else and goto location:. I'm surprised that it's gone this far without someone at MS forcing it to be accepted into each version.
Arrays
String[] s = new String[x];
Becomes
Dim s as new String(x)
For what it's worth, if you ever want to mess about with xDSL and need a cross over cable, all you need do is cross the two middle cables, all the other cables in the bundle are not used by xDSL.
pin description 3 XDSL_Tip 4 XDSL_Ring
Perhaps the easiest way to wire these if you are short on plugs is to try a RJ45 plug in the socket, sometimes you can get lucky and the socket is leage enough to accept it, failing taht, if you cut up a handset cable you can cross the wires in the middle.
2005-08-17 firewalls
Well, I guess today had many problems with the firewall, mainly for those who had written code that accessed other hosts behind the firewall on the external address (which is now natted and redirected to an RFC1918 address). This process is called reflexion, in my best words the problem occours when the packet leaves the RFC1918 address space to it's default route. Once here the gateway sends the packet back to the RFC1918 space. The packet is never given a natted source, so the response packet goes directly to it's RFC1918 source where it is dropped.
There is a fix for this type of problem, three fixes infact, one is done at the firewall, but it is generally a bad practice, why add all the overhead to code when it could be solved by changing some code to understand the difference between local and remote space? Changes at a firewall level would require care to maintain so there is no leakage. Further information on this problem is described in the pf nat/rdr FAQ.
Well, to give myself a break from all the goings on of the firewall I have decided to put some time in converting some previously written C# code to VB.net. This is not going entirely to plan and some opinnions state that the code should translate without any problems. I have noticed the following already:
Ternaries
int a = b == 2 ? 4 : 6;
In VB.net this would (if I can remember correctly) the the following:
If b = 2 Then a = 4 Else a = 6 End If
static
Much of the time I like to use static methods so that they do not get recreated for every object that is made when not required. In VB.net these are not called static like our Java/C# counterparts:
private static int method()
Instead:
private shared method() as Integer
Just to keep on my toes I am also learning Perl in what spare time I have.
2005-08-16 ip woes
Nothing wrong with carp today. All ok, however there's a troublesom box on the network not wanting to give up it's IP address. I'll probably have to do something major with this one.
On a different subject, if you're using SPF and want to have multiple servers on a qmail spf patch that are allowed to relay to you, just change the following file: /var/qmail/control/spfrules, and add each server range as follows:
ipv4:w.x.y.w/24 ipv4:p.q.r.s/12
This was not immediatly obvious to me. SPF is really quite powerful, but has a couple of caveats such as the forwarding issues, but it is a step in the correct direction.
2005-08-15 carp pfsync
I have learnt a couple of things about OpenBSD/CARP today. When changing the IP aliases on the interface, its best to call ifconfig carp0 destroy, then sh /etc/netstart (or add the aliases manually...). This is quite a bother if you do not know this procedure. Live and learn, live and learn.
I still think the pros outweigh the cons with this beatuty of an operating system with a temper like a kebbab.
2005-08-14 linux is for all
This is quite an amusing video, I advise you get it and play it at least once every day. It's quite good but from a couple of years ago, ironically when it was released the flash plugin had to be manually installed. But this is WHY we use Linux, not becaue it does everything for you, but becuase you choose what you want it to do.
Also, if you have time on your hands, check this site out, spamusement.com, the artist takes the subject lines from spam he receives and draws pictures based on this, often in a literal sense. Highly amusing if you get much spam, and can give inspiration to your trash directory.
2005-08-12 proprietory products
Just a quick notice, I've not used any proprietory products on my workstation now for well over two/three years. Anyone who cannot afford to pay licences for software should seriously consider changing to something thats free, there are a number of alternatives out there such as freedos, bsd, linux, solaris etc, there's also plenty of choice out there.
I'm rather tired today, had a busy week with the BSD cluster, finally it's all good and I can rest for a bit and the company doesn't have to pay maintenance rent to the people who looked after the rather expensive router. I'm going to look for PCI X.21 cards in order to save more money through providing the X.21 interface on i386 boxes.
2005-08-06 rant
This is a rant today, I was reading on /. an article about why it is wrong to hate Microsoft. The writer claims all sorts of nonsense about the corporation, which I just dont agree with. It's all opinion anyway.
"Microsoft is perhaps the most hated company in the history of business. Anointed with names such as the Redmond Giant, Microshaft, Microsloth, so on and so forth, the nicknames and jokes are perhaps exceeded only by the vengeance with which people hate it.
The question is why do they? I love Microsoft. Absolutely adore it and what's more, I hate Linux. I think it's the most over rated piece of software ever built and survives simply out of spite and not because it is terribly good at doing something because it is not!"
Hate is a rather strong word for an operating system, and lets not forget, Linux is just the kernel. The rest of the software collection is founded on GNU. Another thing bud, don't use unicode characters in your HTML (you will have to look at his original article, I have corrected his unicode), it shows a lack of respect for portability, so we know you care only of one system now, futher, Aerial is not a standard font, please don't specify it, Helvetica is not that compatible either, so try SANS, or better still, consider if you REALLY need to set a font?
"What has Microsoft given us? It has given us Windows, sure, it was buggy earlier and a lot of things didn't work like they were supposed to (plug and play springs to mind) but it was a pioneering effort. No one was even close to the ease of use that Windows offered. Sure, Mac OS was a lot prettier but then it cost the moon and the stars along with both your arms and legs."
Here you are quite wrong. The effort was not pioneering at all. There was nothing new about Windows, ever. I think the only thing that MS has pioneered is visual basic, besides that the ideas are all copied from elsewhere, including the point and click interface. They bastardised everything else. I believe that Spyglass are still waiting for their browser code to be returned. There is nothing easy about telling a client how to do something over the phone with the mouse pointer interface. Emailing a list of commands is quite a step forward, if they happen to have a UNIX type system, but a list of click this icon, then click that menu etc is painful, on both parts.
"I understand the criticisms about the security of the software, the critical flaws and what not but again, we must look at things in the proper perspective. More than 95 pecent computers in the world use one form of Windows OS or another. The remaining being divided between Linux, MAC etc. now lets say MAC has 1 percent, does it make sense for a hacker to create a virus that can at best infect just 1 percent of the computers in the world? It doesn't, therefore you don't have as many security threats for other software as most of the people developing Linux probably sit at night writing up malicious code for windows!"
What the writer clearly does not understand is that MAC is a Media Access Controller, where as the Applec Machintosh is a computer, and the Apple Gn is the later model. He should not use MAC where you mean Mac, or Gn. Yes it does make a lot of sense for the attacker to exploit even 1% if (s)he can, that 1% may take 100 times longer to fix, if there is less interest, why would F-prot spend time answering such a small customer demand? This meer 1% of systems could be calling home and relaying turely huge amounts of spam. Yes there is a lot of sense in attacking a minor range of systems. Sometimes there is no security in numbers. Just because everyone in the world has AIDS it does not mean that people will find a cure, instead they propgate at a faster rate to try and insure the surivial of the species.
"In a nutshell, it's not so much as that the software is secure; it's simply that no one is interested in spending sleepless nights writing a virus that won't give them the satisfaction they get from causing havoc. Considering the fact that everyone who knows how to write two bits of code dreams of hitting windows with a virus, the guys at the "Redmond Giant" are doing a spectacular job."
Well, are they, really? We're still waiting for 8month old IE updates to bugs and exploits. This is not at all spectacular, if I were to leave a known exploit in code I would probably get fired for not correcting it. It's a rather serious matter, especially when you state above that people are writing exploits for popular software. Also, why the hell are default users given admin rights? They could reduce a lot of problems by making the user become administrator before installing things, like trojans, viruses etc etc, but then they would not need to buy correcting software.
"XP is such a joy when it comes to simply connecting a device and watching the pretty little bubble detecting it and saying "its installed and ready for use" makes the slightly high price absolutely worth it. In Linux, you have to recompile a kernel if you want to so much as change your modem! Give me a break guys, Linux is light years behind Windows XP and I am sure it will be further back biting the dust when Longhorn (now Vista) comes out."
Joy? Huh really? Go find that driver disk, while I modprobe the generic driver. When Vista (virustra) comes out we're going to be on 2.8. On the subject of technically better, you should look at the 0(1) scheduler, composite fonts and clustering methods, you really should reasech the topic before you start claiming that your interface is better than our operating system concepts. In reference to the modem, huh? Don't you mean soundcard? Sure, if you consider using your CPU to process the audio signal and like NO CARRIERS then yeah perhaps, but I'd rather let hardware process the DAC.
"This reminds me of the bundled issues with the antitrust lawsuits being slammed on it. It's just sad, unfair and uncompetitive. Basically what the stupid courts in Europe said was, hey, you're doing a great job, and you must pay for it! This coming from a bunch of people who couldn't even agree on a constitution!"
I'm sure that if you think about what MS have done in terms of nearly stealing ideas and methods (browser tabs?) is that really competitive, or just copying the competition?
"And of course, the long list of lawsuits that Microsoft is straddled with. I am sure it is a business model for companies such as Sun and Oracle to just sue Microsoft whenever their profits are down due to insanely stupid and useless products that no one is buying."
What about the long list of idiotic patents from Redmond?
"Every year, just before the FY results are out, Mr. McNealy sits with his board and shakes his head, guys, we are in the red, what do we do? How do we turn it around? Suddenly a bright face says, I know, let's sue Microsoft for a billion odd! Bill can afford it, after all, he makes such smashing products that everyone buys them, making him rich! That ought to be a crime in SOME court!"
You just keep talking, talking shit.
"Microsoft made some products which it would like to ship together with its OS, no where in the EULA does it say that "you are not authorized to install other software" If Mr. John Doe thinks media player is the worst piece of software he has ever used, he is free to go and download Winamp or Musicmatch Jukebox (neither of these offer free full versions)."
So the end user should. Have you tried to REMOVE Internet Explorer from Windows?
"Lets be fair and honest about this. Here is a company that single handedly created the market for Personal Computers, brought computing to ordinary folks like you and me, made it affordable by encouraging mass acceptance and constantly strives to provide us ease of use in every sphere it touches. From tablet PCs to handhelds to media centers but he didn't do it for free and wants to protect it's own interests. What is wrong with that? After all, the people who are suing Microsoft, aren't they looking after their interests as well? Why do we think or believe that if they were in the position Microsoft is in, they would do things differently."
IBM made the market, along with Tandy. MS came along with an operating system which they had bundled on the PC. I quite like using Linux on a Ipaq, thanks. I also use it on all my portable, workstation and server hardware.
"I do not for a moment think or believe they would be philanthropic and give away years of toil away for free or act in the best interests of everyone but themselves. It is about time we stopped being hypocritical and appreciated a job really well done."
They do not do a good job of making an operating system. There are enough employees at MS to do internal testing and figure out bugs before the software is deployed. Until the software comes bug free, like commercial UNIX software, I will not take it seriously. It's a childs gaming platform that has found it's way into the business market.
2005-08-05 domains
I have a number of .info names which are about to expire, you may make me an offer on one of the names, send email to ed AT ednevitible.co.uk to inform me that you wish to purchase/transfer the name and I will send you back the auth code for transfer. Or you can wait for the names to be deleted and register from new.
- pcwarez.info
- cdwarez.info
- cdrip.info
- linux-net.info
- unix-net.info
- bsd-guide.info
- bash-guide.info
- asp-guide.info
- vb-guide.info
- c-guide.info
- sql-guide.info
- bios-guide.info
- mowdem.info
- ed-is-cool.info
- ediscool.info
- dontcare.info
- getsyou.info
- is-not-cool.info
- iscooler.info
- dodgemaster.info
- is-cooler.info
- eneville.info
- ednevitable.info
I have no intention to renew any of the above names
2005-08-02 ACID
Every once in a while yet another acronymn crops up like shit on the bottom of a shoe, walking itself into the carpet that it touches. Yes, more acronyms, lets take a look at todays: acid, this is in realation to database transactions, it defines a test for databases.
- A
Transaction is Atomic, it cannot be sub-divided. The money may not be given if there is no IOU and the IOU may not be given without money. - C
The transaction is Consistent, the offering of the IOU will always be replied with money, the offering of money will always be replied with an IOU. - I
The transaction is Isolated. The exchange of the money and the IOU do not depend on any third party. - D
Finally there is Durability, the money once exchanged is stored safely and so is the IOU.
Why not just define this as a layer, such as OSI 7 layer model, instead of coining a phrase? Why? Because it wouldn't work as a layer, its jsut some individuals idea of how something should be tested. But.. but wait, we have black/white box testing and a whole host of others, why do we need this test too? We don't, replies I.
Ok, well the need has arisen for me to make a Java SMTP server with small functionality, so I will set about this task.
2005-08-01 links
Wow, first day of the month today. I have just realised that I have no links section on this site. Which is a shame, there are a couple of items that I have seen on the internet over the weekend and today that I think need a bit of a mention. Perhaps I will just put them in a list rather than making a whole page devoted to links.
- https://solarflux.org/pf/
I don't know why these people MUST use HTTPS for their site, but lets not hold that against them, it's a great resource for packet filter links - http://section6.net/wiki/index.php/Thwarting_ssh_hackers_with_swatch_pf
This is a great site. But I think their method for 'thwarting' intruders is a little flawed, you must wait for log analyiser to run. - http://www.openbsd.org/faq/pf/filter.html#stateopts
This provides a much better method for thwarting intruders. However, relies on pf firewall - http://wiki.lugradio.org
We all need some down time now and then. If computing is your thing check out the LUGRadio site, it's really really good, and their radio is just brilliant listening.
Well, if you have not guessed from the links (it should be obvious though) I have been playing with openbsd firewalls and listening to lugradio quite a lot lately.
I've decided that I should make a Java page scaper. There are some pages out there that just make life hard for wget, especially if they use a robots.txt file, so I'm going to make my own program that does what I want it to. Don't go expecting a UI or anything, what I do is strictly console based, with unix concepts, in other words, prints nothing unless its not working right!
Info