Some excel files you might find useful!

For school projects that have been going on I decided to make a few excel files that I think you might find useful as well.

One is to calculate the amount of rebar required in a beam or slab given a certain bending moment.

The other one will dimension a foundation footing for you based on certain parameters you give in.

Off course, all in eurocodes!

This is the rebar excel sheet (contains VBA code, but no viruses, I promise 😉 )

And this is the footing program. Again, containing VBA code.

Stiffness matrix maker for continuous beams

I’ve been messing around with finite element method solution methods, partly for school purposes. I noticed that when I was compiling a stiffness matrix for a large system, I kept on making mistakes.

One of the best ways to get rid of mistakes, especially when they are due to sloppiness is to remove the human factor in the equation.
As the world is becoming more and more automated I think it should be standard procedure for any engineer to think how he or she could automate their work more.

What is a stiffness matrix?

In order to solve systems in a computerized way you need to reduce the model that you are analyzing to very discreet, finite elements.

For example if you are examining the stresses on a beam, you need to split up that beam in smaller beams that will allow you to get a clear picture of the entire system.

And in order to do that you need to use stiffness matrices. The global stiffness matrix of a system is no more than the sum of the individual stiffness matrices of the elements that compose the system.

stiffness matrix of a beam element

The small Excel script I made only takes a look at beams. Hence above is the stiffness matrix of a single beam element shown.

The stiffness matrix basically defines the relation between the forces acting on the element and the different spatial deformations that happen as a result of those forces.

This ties in to Hooke’s law: F = k*x. Where F is the force acting on a spring and x is its movement. k is what defines how much or how little a spring would change shape. k is called the spring constant, however in our analogy k is the stiffness matrix.

Summation of matrices.

The more complicated a system gets, the more elements you will need to get an accurate result from your calculations. As a result the global stiffness matrix is calculated by summing the stiffness matrices of the elements together in the following way:

In the above example we have a beam that is clamped on both ends and a force acting on the beam in the middle. We split this system into 2 analyzable elements. Without taking degrees of freedom into account, the stiffness matrix of this system is the sum of the two individual elements’ stiffness matrices.

We see that the common elements in both matrices are summed together and the remaining elements of both matrices simply used to fill up the gaps in the global matrix.

If we were to completely solve this example we would then “fix” some degrees of freedom in this matrix. As the beam is clamped on both ends it is impossible for it to move anywhere at either ends. Nor will it twist or turn as the connection to the wall is extremely stiff.

In this case the matrix reduces to a matrix where we only view V2 and Theta2.

How to use my excel in your homework assignments or self study practices.

I’ve written this program relatively fast as I needed to hand in the paper in a few days. Hence there are some bugs here and there.

For one make sure to always press “calculate stiffness matrix” before running any other calculations. If you press the “calculate force vector” button twice, your computer will freeze up.

So;

  1. Always FIRST press calculate stiffness matrix and only then press anything else.

But other than that here is how it works:

You first you enter the Young’s Modulus, the second moment of area for the beam and the length of the beam. Also if there is a continuous force acting on the beam, now’s the time to enter its value.

Then you enter into how many elements you want to divide the beam. Unfortunately this quick excel only allows you to divide the beam into equally long elements.

Once you have clicked the “Calculate stiffness matrix”-button, you can then enter degrees of freedom as they appear in your problem. So for a clamped end you would select both X1 and X2 (translation at the first end and rotation at the first end are fixed).

Then simply add any additional point loads if there are any and finally press the calculate “calculate force vector and forces” button to get an overview of the external reaction forces of the system.

Some notes

As this was a quick and dirty fix for me, the program is buggy and some values are unnecessarily long stored in the memory. So just to make sure you get the right results you might need to click “calculate stiffness matrix” and then “calculate forcevector” a few times.

Basically run through the program a few times to make sure all values are the right ones.

I’ve for one noticed that on occasion it shows me the wrong result, but when I then click again on “calculate stiffness matrix” and then on the “caculate force-vector” it then shows the right result.

To make sure it works you can try and calculate some standard examples to verify for yourself that my program works.

For example you can calculate the reaction forces at the supports of a beam clamped at both ends. You’ll see that using my program then you’d need to select X1 and X2 as fixed, as well as X5 and X6.

If you defined a point load at the middle node (at X4) then you’ll find that the deflection value is (1/192)*F*L^3/EI, as well as the reaction forces at X1 and X5 to be F/2.

 

Hope this is of some help to someone!

For anyone looking for more information, I highly recommend this book!

Social media app for mothers

Now that I have a baby on the way me and my wife got talking about how the daily routine would look like after the baby has come.

We came to realize that it will be extremely important for my wife who will stay at home for probably the first year, to get out there and remain social.

It is really hard for an adult to stay at home with a newborn and remain sane!

Adult contact will be extremely important.

However my wife is not alone in her situation. There must be hundreds of other expecting mothers in the Helsinki area who will be at home for the next year to be.

What if an app would be developed, Tinder style, in which moms who stay at home could casually look for new friends to hang out with.

It could be based on similar likes in your facebook profile, or, based on what you hate! Hatr has been around for a long time and seems to do he trick, matching people based on the things they dislike.

A set of a few questions before you sign up could be enough to determine on a very rough level what you’re in to and what you aren’t.

After you “match” with another mom, just like tinder, a chat window would open where you could arrange for a next brunch date!

Palkkitaulukko: Beam diagrams

One of the main untapped goldmines in Finland is the world of SEO. Take the keyword “Palkkitaulukko” for example.

This is such a niche keyword that pertains to a side-branch of the engineering-field. However as no-one in Finland at the moment is even trying to do anything for that keyword, it should be really easy to rank for it.

palkkitaulukko

Palkkitaulukko is a list of different load cases for beams. A cheatsheet if you will. You can find a decent “palkkitaulukko” here.

 

What is a “palkkitaulukko” anyways?

In engineering, and even more so in structural engineering, you get hit left and right with different kinds of formulas. It’s impossible to remember them all.

As most objects in the structural engineering field are either beams or columns, fins have made a table with the most common beam situations. Not unlike any other bended beam table you can find online.

In this table some of the most common ways in which you can load a force onto a beam have been listed, with their maximum moment and maximum deflection.

It’s just a handy cheatsheet for when you are calculating stuff!

A lot of times it’s handier to check a certain load case from a beam table than it is to start calculating it from scratch.

Good self-learning guide

There are a few good books on Amazon that will help you learn how to calculate these problems. Better yet, that’ll teach you how to use these “palkkitaulukko”!

Click here to view Schaum’s outline of statics and strength of materials.

Puustelli library at Prodlib

Pretty excited to see the Puustelli library for Revit and ArchiCad be published.
In most other projects I have participated to a bigger or smaller degree. But Puustelli is the first library that I can say is my doing. I worked together with our contact at Puustelli for a good couple of months before we pushed this one out.

In itself there isn’t that much difference in what we do in other libraries compared to this one. The only specialty with this library however is that we are sharing rendering files to come with the models.
In ArchiCad that isn’t such a big deal as they can be easily defines within the .lcf-file. In Revit however this is a bit more challenging as the paths from which Revit fetches the rendering images can vary from one computer to the other.

Now the method chosen isn’t perfect, since we assumed most computers used for work and structural calculation most likely will run on some version of Windows. Hence the path in which the ProdLib library is installed will most likely stay relatively similar from one Windows version to another.

For Mac however it can be a bit more tricky and it might not always fetch the right images from the right places as it assumes a Windows operating system. This will probably be solved in version 2.0 of this library.

However I’m very pleased with the whole look and feel of the library. There probably are still some mistakes here and there. It might not be 100% flawless but it is mine :)! We’ll work out whatever kinks there are in future editions anyway!

ProdLib and the Puustelli library can be downloaded here.

Amazon Affiliate Link checker – tool 2.0

I’ve been wrestling with the Amazon API and found this great php snippet written by the people over at patchesoft.

Basically they have written a complete class I can call in my scripts to handle all of the communication with the Amazon API for me.

Now I am a complete newbie when it comes to PHP programming, let alone communication with an API.

So I am pretty chuffed to have come up with what I have done so far. Right now the checker tool scans a webpage for any tags with “href” in it, then it assumes those are websites.

That is a pretty safe bet.

Then it checks whether or not “shortened” url’s have been used, as is the case in a lot of affiliate links. It then unwraps the url and digs the associate tag and the product’s ASIN code from the URL.

Afterwards it uses the AmazonAPI-class to make a call to the API with the ASIN in question. It then checks what response it gets for availability when making a call with the ASIN of the product.

If it is an empty response then we just assume that the product is either unavailable, or “available from these sellers”. Both cases will result in my checker showing a “Unavailable” status however..

Things learnt:

-In the Amazon API class there is a field way up reserved for the different types of response groups. These response groups are important to list and details can be found here on what belongs where. At first I didn’t list the response groups that have the availability parameter in it and I was scratching my eyes out why my code wouldn’t work. The path etc was correct. But as I wasn’t including any of the necessary response groups in MY response XML there was no such field as <Availability>.

-PHP security. I have to use my own accessID and scecret key to make calls to Amazon’s Product Advertising API. So a challenge was to think of how to store that data in a safe way. Utilizing varous tricks to limit access to the private side of my website was a new experience!

-In general PHP coding. It seems a lot online is handled through PHP so it’ll be interesting to delve deeper into what kind of information can be passed back and forwards through pages, inputfields and tables.
Especially as I’ll be building another tool I dicussed earlier. For that project I’ll be needing a lot more php to access and store database information!

 

Things to do:

Right now the crawler just browses the given page and only returns the amazon links.

It would make sense that if you give the main domain of your website, the crawler would start crawling also a few levels deeper so you won’t have to.

So if you for example give your site “http://www.mysite.com” and on your homepage you have a menu, then the crawler would crawl through those menu-links, and return any amazon links that may be there.

This has been suggested by already a few people I have spoken too.

A few issues though is that my script isn’t the fastest around. In fact it’s dead-slow.

So 2 things need to be done:

  1. Speed up the PHP-script so that it cycles through the found links faster
  2. Go as deep as possible when crawling a website and return the URL for the page the crawler is on, to the main table we have all come to know and love <3.

Amazon Affiliate Link checker – tool

It’s a terrible name for a tool. I know..

However it does the job though. Quite often I’ve seen people ask me whenever I’ve sold them a site: “How will I know I changed all the links?”. Because if you leave a tag unchanged on your site, that affiliate sale won’t be going to you..

The mechanics..

For those of you who are not familiar with how affiliate marketing works the above will’ve sounded like hebrew.

Affiliate marketing works in such a way that you push traffic to a site. That site then pays you for the traffic you have sent, should that traffic make a purchase.

I’ll just use amazon as an example as it seems to be the most popular affiliate platform.

So if I send someone through my website to Amazon and should that someone buy something from Amazon, I make a little bit on that sale. That’s how the economics works.

Now your next question should be: How does Amazon know that that person came from your site?

Good question!

Affiliate links

Here we come to the root of our problem. Affiliate links is how amazon keeps track of who came from where. And, more importantly, who to pay what and how much.

Every product mentioned on any niche site pushing people to Amazon uses affiliate links.
These are normal amazon product links, with one difference. These links contain tags that Amazon registers to each individual niche marketer.

So if you buy an already operational niche website that is making money, it’s in your best interest to change all tags in the affiliate links to your own.

However up until now you had to manually sift out the links from the page and just hope you got them all.

With this new tool I made, you can check a URL; It’ll then show you all amazon affiliate links on that site with its anchor text AND it shows who’s tag is attached to it.

So if you see a tag you don’t recognize, simply search for the anchor text of that link and change that link to a link that has YOUR tag.

Simples!

For the ones who want to know how I did it:

It’s a small php script I have running that parses a certain URL for links:

$url=$_POST[‘URL’];

$html = file_get_contents($url);

//Create a new DOM document
$dom = new DOMDocument;

//Parse the HTML. The @ is used to suppress any parsing errors
//that will be thrown if the $html string isn’t valid XHTML.
@$dom->loadHTML($html);

//Get all links. You could also use any other tag name here,
//like ‘img’ or ‘table’, to extract other tags.
$links = $dom->getElementsByTagName(‘a’);

//Function to check for shortened amzn.to URL’s
function unshorten_url($url) {
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_FOLLOWLOCATION => TRUE, // the magic sauce
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYHOST => FALSE, // suppress certain SSL errors
CURLOPT_SSL_VERIFYPEER => FALSE,
));
curl_exec($ch);
return curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
}

//make it look nice
echo ‘<table>’;
echo ‘<tr class=”header”>’;
echo ‘<td style=”vertical-align:center; font-weight:bold;”>Anchor text</td>’;
echo ‘<td style=”vertical-align:center; font-weight:bold;”>Amazon tracking code</td>’;
echo ‘</tr>’;

//Iterate over the extracted links and display their URLs
foreach ($links as $link){
echo ‘<tr>’;
if (strpos($link->getAttribute(‘href’), ‘amzn.to’) !== false || strpos($link->getAttribute(‘href’), ‘amazon.com’) !== false) {

//Check for non-existant anchor text, most likely an image link
if($link->nodeValue==””){
echo ‘<td>’;
echo “IMAGE LINK”, “\n”;
echo ‘</td>’;
}

else{
echo ‘<td>’;
echo $link->nodeValue, “\n”;
echo ‘</td>’;
}
$parts = parse_url(unshorten_url($link->getAttribute(‘href’)));
parse_str($parts[‘query’], $query);
echo ‘<td>’;
echo $query[‘tag’];
echo ‘</td>’;
echo ‘</tr>’;
}
}
echo ‘</table>’;
echo ‘</br>’;
echo ‘</br>’;
echo ‘<a href=”https://www.bartjansen.fi/toolsfolder/affiliatelinkchecker.php/”>Go try another link!</a>’;

 

Happy link hunting!

 

 

edit: Already I’ve seen a few additions I could do to this tool. It could also check if the link is still working. Meaning that is the product still existing in Amazon/check for 404’s…

So many ideas!

Search Engine And Directory Submission Sites

Recently for projects I’ve been running with an Indian friend of mine I’ve been thinking on automating some of the link building using directory submission sites.

Alternatively there are also search engine submission sites available.

What are search engine submission sites?

Basically as far as I’ve understood it these are sites that add your own site to their directory. In this sense they send a spider to your website, index it and add it to their directory.

As a result your website is now listed in some directory somewhere that is crawlable. In the age before Google there probably were some hundred of different search engines available.

The good thing is.. These are still up and running! Even though Google has taken the lion-share of search traffic over the years, these directory and search engine websites are still being maintained.

How do these differ from directory submission sites?

Directories are basically a collection of websites grouped around topics. In the early days of the internet there wasn’t really a clever way of making information searchable.

So people just did the best they could and started gathering websites around a certain topic and group them in a directory of that particular topic.

It is a very clunky way of storing information but for all intents and purposes it does the job. If you click on a nature directory, you’ll be bombarded with sites ranging from tree diseases to a site talking about a particular type of goat living in the high-Andes… Just kidding but you get my point.

And there probably is a goat somewhere that lives in the high-Andes and most likely someone will have made a blog about it. If not I’ll be the first and figure out a way to monetize that too!

In short..

Search Engine and directory submission sites can greatly speed up the work of someone looking to up their SERP scores. In some cases, with the click of a single button your website will be added to multiple directories, creating multiple, decent quality back links in return.

What does that mean for someone looking to do a bit of SEO?

A lot actually. Assuming you are looking at doing white-hat SEO and not trying some dodgy stuff. The thing with white-hat SEO is that it is extremely time-taking.  Sending out eamils, reaching out to people, researching who to contact next just to get a few links.

It’s time taking. So there is a way to speed things up a little.

Serach engine submission sites add your website, coupled with your email address for verification purposes to a vast network of pre-Google search engines. These will gladly index your site and add them in their directory in an effort to make their directory bigger.

Don’t expect any influx of traffic to be coming this way though. As the search engines in itself are virtually useless. The reason we are doing this to get your link listed somewhere online, that is also readable by Google.

In doing so you will have, essentially, earned a link. And as in the early days of Google there is one metric that still counts: Links are votes.

The more links point to your website, the better you will do in Google’s eyes.

Are all links created equal?

They are not. As most of you reading this are probably aware; link quality plays an important part into the way the Google algorithms rank your website in relation to others in your neighborhood.

But that is the beauty of these directory sites and pre-Google search engines though. Especially the search engines have a relatively good rep with the folks in Palo Alto as these are relatively tricky to game.

For directories you have to be careful nowadays as a lot of them have become breeding grounds for Cialis and Viagra related businesses looking to advertise (and gain links).

 List of the best directory submission sites

Here are 30 online directory submission sites you should visit and put up your website. What they require from you is just some basic info about your website and your email address for verification purposes. It can be a bit of a drag to fill all these out manually (maybe I should script this somehow).. However it’s worth it in the end as you get extra links for relatively no effort.

1.      All Free Things  (Page Rank 4)

http://www.allfreethings.com

2. Free PR Web Directory (Page Rank 6)

http://www.freeprwebdirectory.com

3. Travel Tourism Directory Info (Page Rank 6)

http://www.traveltourismdirectory.info

4.  So Much (Page Rank 6)

http://www.somuch.com

5. High Rank Directory (Page Rank 6)

http://www.highrankdirectory.com

6. Britain Business Directory (Page Rank 6)

http://www.britainbusinessdirectory.com

7. Marketing Internet Directory (Page Rank 6)

http://www.marketinginternetdirectory.com

8. Hot Vs Not (Page Rank 6)

http://www.hotvsnot.com

9.  Submission Web Directory (Page Rank 6)

http://www.submissionwebdirectory.com

10. Diolead (Page Rank 6)

http://www.diolead.com

11. Uk Internet Directory (Page Rank 6)

http://www.ukinternetdirectory.com

12. Jet Jaws (Page Rank 6)

http://www.jetjaws.com

13. Esjoub (Page Rank 6)

http://www.esjoub.com

14. Lilink (Page Rank 7)

http://www.lilink.com

15. Feed Up Info (Page Rank 8)

http://www.feedup.info

16. Finance Buster (Page Rank 6)

http://www.financebuster.com

17. Synergy-Directory (Page Rank 4)

http://www.synergy-directory.com

18. Nexus Directory (Page Rank 4)

http://www.nexusdirectory.com

19. Directory Fire (Page Rank 4)

http://www.directoryfire.com

20. Master Moz (Page Rank 4) 

http://www.mastermoz.com

21. Direct My Link (Page Rank 4)

http://www.directmylink.com

22. Pro Link Directory (Page Rank 4)

http://www.prolinkdirectory.com

23. Info-Listings (Page Rank 4)

http://www.info-listings.com

24. Submissions 4U (Page Rank 4)

http://www.submissions4u.com

25.  Piseries (Page Rank 4)

http://www.piseries.com

26. Gain Web Org (Page Rank 4)

http://www.gainweb.org

27 Best Free Websites Net (Page Rank 3)

http://www.bestfreewebsites.net

28. PR 3 Plus (Page Rank 3)

http://www.pr3plus.com

29. Web Directory Co (Page Rank 3)

http://www.the-web-directory.co.uk

30. 10 Directory (Page Rank 3)

http://www.10directory.com

 

List of the best search engine submission websites

I’ve personally used http://www.cleversubmitter.com/ for my previous projects as well as http://www.freewebsubmission.com/.

Both have proven to be pretty useful and have not given me any bad rep (at least not according to the google search console) nor have I experienced any negative influence on my SERP. In fact quite the opposite.

Contrary to the directory submission sites the 2 mentioned above allow you to add your website to hundreds of prehistoric search engines. And as a result get multiple, white-hat backlinks at the click of a button.

After adding my sites to the above links I noticed a small, but noticeable jump across the board.

Happy adding and let me know if some of these links don’t work anymore!

 

New niche site: ScalextricLab.com!

Since selling my safetyshoesreviews website I have cleared another slot in my inventory.

Right now I have started https://www.scalextriclab.com together with an Indian buddy of mine. He provides the content that I then review, adapt to make it SEO friendly and do the off-page SEO.

So far we have had one click already coming from Facebook to our site since posting our first article yesterday.

I estimate that the value of this niche site will reach close to $3k especially when you take the Christmas season into account!

GDL reference guide: Perfect self-study material!

I find that relatively often I have to check the “bible” of ArchiCad: The GDL reference guide.

In this guide in over 600 pages Graphisoft goes through the basics of how the GDL programming language works.

If you are interested in making objects for ArchiCad, this reference guide gives a detailed description of GDL, including syntax definitions, commands, variables, etc.

You can download it for yourself using this link.

Table of contents and logical flow

The reference guide starts of handling 3D objects before moving on to how to represent them in a 2D plane.

It however lacks severely in for example curtain wall and other feature objects that have become more mainstream in later versions of ArchiCad.

For those of you who have been reading this blog you’ll find that the ArchiCad curtain wall is severely under-documented in the reference guide.

Lastly before going over the various listing parameters the GDL reference guide goes through making user interfaces.

Later I’ll post some code-snippets and ideas that have helped me in the past. Making user interfaces can be tedious but with the right templates, they are a piece of cake!

GDL reference guide additions

In a later post I’ll add more information on several additions that were made to the reference guide.

For example the GDL cookbook by David A. Nicholson is a really good addition if you are tackling GDL at home.

In a very clear and straight forward fashion David demystifies several commands and codes included within GDL.

Although the cookbook was made for a very early version of ArchiCad, it is still relevant. The version in which the cookbook was written was iirc ArchiCad 8. Now we’re up to 21 already at the time of writing.

However the good thing about GDL, the GDL reference guide and the cookbook is that the language itself remains fairly static.

As a result objects written in ArchiCad version 8 will work just as fine in later versions (mind a few UI quips that I’ll go through later as well..).