Category: Blogging

May 21st, 2017 by mathias

After I moved my blog to self-hosting, it has attracted more and more spam. It started slow and very manageable. After my last blog post it got really bad. What started as a few spam messages a week, culminated with 30-40 spam comments per day. At that point I had completely lost any ability to sort through it.

‘I was so disheartened by this that blogging didn’t happen as I knew I had to solve this first. I thought solving it required paying for Akismet and that annoyed me. I pay for my hosting and domain and so forth, but paying just to get rid of comments meant to abuse my blog felt wrong especially as the blog does not have that much traffic that it felt reasonable to have to filter spam.

I kn ew I had to do something this weekend and after just a little bit of googling I had seen a few recommendations for Anti-Spam by Webvitaly. After reading up it seemed like a very promising option. Since spam engines does not do JavaScript, it places a hidden field on  the comment form and the populates it with the correct answer when someone submits a comment, but the spam engines puts no or bad data in it so the comment is just ignored.

After installing it 36 hours ago, it has filtered out 60 comments and not let through a single spam comment. I say it does the trick for what I need. I can go back to blogging about Oracle and other technologies I fancy, instead of being forced to deal with spam comments.

If you need to filter spam and be able to not even review them, based on my experience this far I’d definitely recommend you to look at this plug-in.

Posted in Blogging

October 11th, 2016 by mathias

So this is my post aboout my favorite feature of my favorite product. I can hear a lot of you say “The community is not a feature of the database or any other product”?

That is your opinion, I think it is the greatest one. I’d say that the mostly friendly Oracle community is by far the most important driver for quality solutions. I know I have and still do learn more from the community than from any manual.

I began using Oracle AskTom back when I started with Oracle. Tom was nice enough to start it up just months before I joined the fun in the Oracle world. From there I started finding all the amazing blogs that let me dig deeper and deeper into the database. Part of finding that community was fidning great presenters at Training Days that RMOUG holds every year. Those two days used to be the professional highlight of the year while I was based in Denver, CO.

My manager at the time used to comment that where she and others just saw a technology I referred to the community over and over. That is how I see it, when people talk about Oracle I think about the company and the community first and about the specific technology after that.

That is still the case to the point where I today try to create a community where one is missing. That one is just a very small piece in the bigger world wide community of Oracle professionals. The user group scene is one of the greatest opportunities available to learn more and to get a chance to share the knowledge one happens to pick up.

Not only is taking part in the community one of the greatest opportunities available to learn critical skills in the technology you focus on, presenting in it on thing you think you know forces you to learn even more about it. It is also a great way to start building a network to others who enjoy sharing and debating technical aspects of Oracle technologies.

Another part of the community is OTN who sponsors a large part of the things that makes the community “one” community. Things like the ACE-program that awards some of the best in the community the ACE-title for their ability to share and educate. The ability for user groups to have ACE Directors to visit and hold a couple of presentations is a fantastic thing for every member of a user group.

Going to conferences and when I get a chance to present at them is one of the things I enjoy the most. That is when you really feel the power of the community. I feel we have too little of it in Sweden, so to see and feel how great it is in other places provides a lot of motivation to bring people together in one in Sweden.

If you are not feeling part of the user group community, sign up with your local user group. Start reading blogs, get on twitter and start following some of the greats. From there you’ll find more and more interesting sites, people and blogs to follow.

I’ll refrain from name dropping the guys and gals I follow. If you know me, you’ll know who anyway. If not, search for your favorite topics within Oracle on Twitter or google it followed by twitter or some other social network name and you’ll find lots twitterites or bloggers writing about the stuff that inspires you.

If you still want a list of where to start, hit me up and I’ll get you a good starting point from where to expand your horizons.

Posted in Blogging, OTN

September 11th, 2016 by mathias

The world is moving to https, but that was not the reason for the move.

Initially I was happy to use whatever Digital Ocean (DO) supplied in the WordPress droplet. But as I explained in my last post, I had some problems with moving from wordpress.com to my self hosted site at DO.

In short the problem turned out to be Chrome caching sites that accepts https making my site unavailable to every visitor that has been to my site in the past including myself. It seemed like DO forced https but had not configured the droplet fully. That was not the case at all, it was configured for http, but not for https and doing that was well documented.

Had I understood that and what happened from the beginning it would have made this so much easier, but I only realized what Chrome did a couple of minutes after my troubleshooting and fixing what I thought was a half baked config. It would have saved me from spinning up about five extra droplets, reading a lot more about Apache2 than I really needed. However, I learned a lot so it was good that I mistook what happened for being something the droplet did.

To make it work I started with performing the work of the initl server setup they recommended. Most of it was things I knew I ought to do so it made sense, but the real reason was that the https-post they had referred to is as the inital step. So I followed it just to make sure I did not miss a required step.

Then I ran four commands to make Apache load ssl and configure virtual servers for it.

cd /etc/apache2/mods-enabled
ln -s ../mods-available/ssl.conf
ln -s ../mods-available/ssl.load
ln -s ../mods-available/socache_shmcb.load
cd /etc/apache2/sites-enabled
ln -s ../sites-available/default-ssl.conf

In hindsight I’ve realized that the proper way to enable modifications would have been to just do “a2enmod ssl”. However, I have not tried that in a fresh droplet so I leave that here just as a suggestion.

All that remains now is to use yet another fantastic writeup DO provides. It shows how to create a free ssl certificate using Let’s Encrypt and configure Apache to use it including how to make it renew automatically. It is easy, fast and works with no complication at all. At least it did for me.

In addition to Digital Ocean that I find extremely impressive, Let’s Encrypt is by far one of the most impressive sites I’ve found recently that I never knew existed. I recommend everyone to go there and read up on what they do and how it works.

Full disclosure: The links to Digital Ocean (DO) in this article uses my referal link. Using that I get a discount from them and so do you. I had this post planned before I happened to get a referral-id the other day, they are quite honestly one of the most impressive destinations for IT-geeks I can think of. Go check them out using my referral or just enter digitalocean.com into your favorite webbrowser (that link is referal free – use the other to save money).

Posted in Blogging

September 5th, 2016 by mathias

I had decided to move one of my blogs to a self-hosted model to get more control over plugins and other things. After reading up a bit on different vendors I found Digital Ocean to be my choice. What’s not to like with a place that can spin up a complete Linux with WordPress installed and ready for me to use? Yes, it only takes them seconds and it is powered by SSD. Adding that it costs $10 per month ready to go and for $2 a month they include a preconfigured weekly backup. Seeing this and knowing it is lightning fast, I could not think of a reason to try someone else.

So I took my domain “mathiasmagnusson.com” that has just a couple of pages and no blog posts. All blogging is done on sub domains on that. This should be easy and let me test the move without interrupting the other blogs, right? It was easy, I imported the site from wordpress.com, set a new theme, and made a few different tweaks. Accessing it by ip-address worked great, it was everything it used to be and looked better. Yes, that is probably because it wasn’t a piece of art before the move (either).

Now all that was left was to point the DNS A-record to my new place. Or so I thought. I started with pointing the DNS at there using local name resolution (/etc/hosts) and a made up name “mywp” and it worked perfectly even after changing the name in WordPress for where it was located so all pages was linked to using mywp instead of the ip. Time to change GoDaddy to point to the ip of my new site. After doing that the site worked on ip, but failed on access with name. It reloaded using https and I got a connection refused message. As the tab showed the WordPress logo, I made the conclusion that it must be WordPress sending back a redirect on http when accessed with a public name.

I started a service ticket with Digital Ocean and we got to over 15 replies over the weekend where they did the best they could to get more and more info from me and why I think it is their server acting up and me trying as hard as I could to prove what was self evident to me – of course it had to be on their server or network, it was a connection refused and a reload with https. Nothing else in the chain would do that.

At this point I spun up server after server proving to myself that this could be proven without doing anything more than just getting the server created and then using local name resolution. At the same time I did a deep dive inte the WordPress code, reading on ssl, certificates, how it should work. I found that it has snake oil certs installed and it really seems like the https stuff is half baked, but why is not the Internet littered with posts about it? As I depart on the SSL-stuff the discussion on why it even happens continues. I will explain that first and get to what I learned and did with SSL later.

It turns out that Chrome has a cache for sites/pages you have visited before that was serving https then. So it is nice enough to silently rewrite all such page requests for you. Normally this is a great function. But when you move from a place that used https (wordpress.com) to one that does not like my new site, it makes all accesses to pre existing pages fail. The exact opposite of what one wants, the intent is to make such a move transparent to all visitors.

Chrome even has a function to add sites/pages to the cache so you can try breaking things for yourself. Should you have this problem or want to play with this, go to chrome://net-internals/#hsts and add or remove. If you encounter the issue with automatic rewrites by chrome, you want to remove the site here.

There is a feature meant to help in that it lets sites tell chrome to always enforce https for it. That is a good thing, until it moves and the site still has the same exact name. Then it can make every reader of your site/blog unable to read it. Thus, moving from a https-capable site that uses HSTS – HTTP Strict Transport Security – to one only capable of http can make your readers lose access completely if they are not aware of this and most of them will not be.

This has become a very long post now, so the explanation for how I got my site https-capable will be written up in its own post.

Posted in Blogging

October 31st, 2012 by mathias

That was essentially reader Gabriel posted on my post Suppressing repeating values in SQL.

At first my reaction was just to ignore it as I felt it was too odd. But then use FarMan posted a complete opposite “Dude, you just saved my life. Thanks so much!”. Could the same post really get so different reactions?

Gabriel’s question was:
“The above is a neat trick, but only for the purpose of showing off. What’s the use? Please enlighten me, because I’m totally missing the point why you would waste your time and talent on this.”

At first I didn’t think much of it and just took it as a comment about some feature not being what Gabriel needed. But while it was probably not what Gabriel was asking, there may be a reason to question if blogging is just a way to show off?

After thinking about it, I’d say that yes it probably is a little bit. Anyone writing a blog does it out of interest to attract readers and to share their knowledge or experience in some way. But is an interest in writing and sharing ones knowledge necessarily the same thing as bragging?

I dont think it is, but I think there are blogs that does just that. You know the ones, I know the ones. However, I do not intend to point them out by name. The ones that does not share knowledge. A blog that just claims a point and states that the author can fix it by applying their special magic. Especially when claiming things other people rarely see or even think is a problem, but with no test case, no data, and no shared approach it is hard to prove otherwise. Even if such a blog would be correct, there is nothing anyone else can learn from it. Such posts clearly serves to boost the ego of the writer without letting other people learn something.

However, blogs written following Tom Kyte’s teachings on “Do not trust anyone, prove it to yourself” where all claims must have an appropriate testcase with setup, expected result, and explanation for how to fix the problem are not bragging. those are the ones that allows everyone to take the tests and run them and if the conclusions are faulty an engaging debate about how to better evaluate and troubleshoot the issue. Such posts rather puts the author at risk of being humbled by the masters of the field in case their claim is based on a misunderstanding.

I also object against the idea that showing a way to use a technology in a way that has no apparent immediate application to be bragging or just useless. I think that surpressing values has a great application in “some” cases. But even if you do not, the suppression testcase shows how you can relate one row to the last one and base operations in the SQL on it. Clearly that can be useful if the data has a relationship that is useful to the intended result of the query. Seeing a way today for how a certain feature works or some obscure way to use SQL may very well solve a problem you didn’t know that you’ll have tomorrow.

That is exactly why reading blogs is useful. When you need a feature, you may have read about it in a blog a few months earlier. It may even have been mine and you could have thought “what a waste, there is no need whatsoever for this feature”. Then one day you realize that your problem can be solved by using that obscure feature you read about a while back. Hopefully Gabriel will one day find a use for suppressing values and may then remember the post he read about it. Or maybe someone finds a much better way to do it and then through a comment here we’ll all learn of that way to implement suppression.

Posted in Blogging

February 22nd, 2009 by mathias

OK. This blog has been dormant for longer than what should have been possible. Having moved across the world, started a new job, and returned career focus to Oracle specialist (from more or less forced management roles) it's definitely time to start writing again.

The first step has been to move it to a proper blog platform, it is now at http://oradbdev.mathiasmagnusson.com and the same feed as before (http://feeds2.feedburner.com/OracleDbDevelopment). Assuming this works and it gets to the blog reader, next post will hopefully deal with something Oracle related. If not, I'll have to make a few attempts until I get all of this to work. I apologize ahead of time in case I'd need a few tries to make all this blog magic work.

Posted in Blogging

May 21st, 2007 by mathias

Reading this post about why the average Oracle IT worker doesn't read blogs got me thinking. Does the average IT worker read blogs? I'm not sure. In what I have observed, it is something a segment does. I'd contend that the average blog reader is more advanced and more thirsty for more knowledge that the average person in the same field. I think it is also something the more internet aware do. Everyone knows about the internet, but how many non blog readers can explain the technologies involved? I have a feeling that most that can are on the blogosphere as readers today.

This is not to say that there aren't really good Oracle Specialists (or IT Specialists for that matter) that doesn't read blogs at all. Some has never looked at newsreaders and stay away because they don't want the hassle of learning one more product, other feel it is a waste of time as most blogs are useless to them, yet others feel that there are good blogs – but they are too hard to find.

I think most will improve and learn interesting things if they start reading blogs, I know I have learned many things I'd never have thought of or heard about if it weren't for blogs. Participating on and reading the best blogs is like an informal study group where you can opt in to learn about the subjects you are interested in.

I think it is that some like reading and learning small segments, while others are happy just doing what they know and hopefully hitting the Oracle docs from time to time when they get stuck. It may be similar to how it is natural for some to look up concepts and syntax in the documentation while others try to avoid the documentation like the plague. Maybe most blog readers are among those who like to read the documentation to learn more. There is a difference between looking things up because you have to and enjoying it because may always learn something new.

What do you think? Is this an awareness issue or is this just one of those things where some people will never learn to like the blog format for their reading and learning?

Posted in Blogging, Oracle