FreeCAD Tutorial Office Chair Part 4: Five Struts and One Receptacle

25. July, 2019

Here is part 1: FreeCAD Tutorial Office Chair Part 1: Setup and Constraints

Or go to the previous part.

While You Were Away …

I fixed the transparency and the hard edges of the joint plus renamed a few nodes:

Here is the file: Office Chair Tutorial Part 04 Start

The Base

The base of our chair should have five struts and hole to support the gas spring:

Struts

Create a new body, call it “Strut”.

Create a sketch, use the same plane as the joint (YZ Plane).

You should end up with this:

Draw a corner around the vertical joint axis:

For the arching strut, we’re going to use two B-splines with control points. For each arch, create three control points (so the whole spline should have 5 points):

Those “fans” look weird, right?

Those visualize how “bent” the spline is (= speed of change of direction, longer lines = faster change). If you have nicks in those curves (like above), it can mean trouble. Let’s ignore those fans for now.

Note how I created a sharper bend by moving two control points closer together (lower spline, two control points to the left).

Make sure that the left end points of both arches are constrained to the end points of the corner.

Keeping Stuff in Place

One thing I would like to do is to constrain the “joint end” of the strut to the “Vertical Rotation Center” which we created in the joint. That way, the strut will keep it’s position relative to the axis of the joint. The problem is that this datum line is part of the “Rotating Joint” body.

To change this:

  1. Close the (incomplete) sketch.
  2. Right-click the node “Vertical Rotation Center” (below “Rotating Joint”)
  3. Select “Copy”
  4. In the dialog “Object dependencies”, chose “No” (don’t copy the “Vertical Joint Axis”, too)
  5. Right-click “Strut”
  6. Select “Paste”
  7. Rename the new node to “Vertical Rotation Center Copy”

Double click “Sketch006” to continue working on it.

Try to apply a horizontal constraint between the bottom left edge and the datum line.

Turns out, we can’t select the datum line … now what?

Let’s try a “local coordinate system”.

  1. Close the sketch
  2. Make sure “Strut” is active
  3. Select “Office Chair Tutorial Part 04” in the tree
  4. Create a local coordinate system
  5. Select the ring we used as base for the datum line (where the axis and the joint meet)

Hm …. I would prefer the Z axis to go “up”. To achieve this, check “Flip sides”:

Nice. Click “OK” to create the coordinate system.

You’ll get this dialog:

Remember we selected the circle? It’s part of the joint body. FreeCAD now wonders how we want to handle this situation. Do we want to create something which will stay put when we change the joint? Or maybe we just want to use the new coordinate system in the body it references (dependent copy)? Or should changes to the joint move the coordinate system?

We want to last of the options since one end of the arch should stay where the joint is. Select “Create cross-reference” and “OK”.

Hm … there doesn’t seem to be a way to use the new coordinate system in the existing sketch.

I also can’t find a way to use it in a new sketch.

The sketch always asks for a plane. The toolbar offers a datum plane, let’s try that.

I again select the circle, attachment mode is “Concentric” but the new plane is coplanar (= in the same plane) with the circle. We need something that is perpendicular to the circle. Flip sides won’t help this time, set “Roll” to “90 °”:

The orientation looks good but what about the origin? From the preview, the plane seems to be way to far up/right. Let’s hope for the best. OK, “Create cross-reference”, OK.

Create a new sketch and now ,we can select our now DatumPlane:

Hm. Why is everything upside down?

3D is annoying. I bet this is because of our 90 ° roll. Edit the plane, select “Flip sides”. If we create a new sketch, this looks much better:

What about our existing geometry? I couldn’t find a way to copy the elements and constraints over, so they are lost. Just make the old sketch visible and draw something similar.

Now for the big moment: Will the constraints use the new origin?

Yes!

Working from left to right, I get this fully constrained sketch:

The blue distance at the bottom is a constraint in “reference mode” which basically means it just shows a value but doesn’t take part of the solution process:

  1. Toggle to reference mode. Some constraints will turn blue.
  2. Take the blue “Horizontal distance” tool and select points at the ends of the strut.

Close the sketch and pad it, 10 mm, symmetric to plane plus some fillets gives me:

Socket for Gas Spring

For the central socket, we need another datum plane at the far end of the strut. Otherwise, attaching the chair to the base would be complicated.

Note: Another solution would be to join all parts in a compound and then move the compound around until the upper end of the strut is near the origin (right now, it’s just the other way around).

Note 2: Before you design something complicated, you may want to figure out a good place for your origin. Our situation happened because I chose to build the first foot around the origin.

The new datum plane is parallel to the first one but shifted to the right (= positive along the X axis)

I tried several ways to achieve this but I have a feeling that creating work / datum planes is not designed very well at the moment. There are lots of complicated options but nothing that really works well.

In the end, I used this complicated mess:

I selected “Plane face” as mode, then clicked on the yellow face. I created a sketch based on this plane. Jumping back and forth between the sketch and the plane, I played with the attachment offsets until it was kind of where I wanted it:

One revolve and a few fillets later, I had this:

Getting Five Struts From One

The last step is to make five copies of the strut plus foot.

While I could use copy & paste, the copies would be independent. So no change I made to the original would propagate. To solve this, there is a Array tool. This tool can create copies and arrange them, too.

As rotation axis, we need a datum line. Select one of the circles around the socket:

Click OK.

Since we want to copy three bodies (wheels, joint and strut), we first need to combine them into one body.

  1. Switch to “Part” workbench
  2. Select “Dual Wheel” and “Rotating Joint” in the tree
  3. Click “Make Compound”
  4. Rename the new node to “Joint with wheels”
  5. Select “Joint with wheels” and “Strut”
  6. Click “Make Compound”
  7. Rename the new node to “Strut with foot”

Your tree should now look like so:

To create five copies:

  1. Switch to “Draft” workbench.
  2. Select the node “Strut with foot”
  3. Click the menu “Draft” / “Array”

At least in my version of FreeCAD, this didn’t have a dialog or panel to configure the array. Instead, you get this:

Change these values:

  • Put “polar” into “Array Type”
  • Put “1” into “Number X” and “Number Y”
  • Put “5” into “Number Polar”

You’ll get this:

Remember when I said that it’s important to decide where to put the origin? That’s why.

Also, there is no way to select a rotation axis (the datum line from above).

How to fix this?

One way is to move the “Strut with foot” so that it’s other end is near the origin. This can be done by changing the “Position”. On my case, the y value:

Okay … better … I guess. What’s with the wheel at the center? Doesn’t want to play with the rest?

Enough for today. Here is the file if you want to fix it yourself: Office Chair Tutorial Part 04


FreeCAD Tutorial: Office Chair

24. July, 2019

This is a multi-part tutorial how to create an office chair with FreeCAD (documentation).

FreeCAD is a parametric 3D CAD software. This means it remembers all the operations you did to come up with a shape. Some of these operations can be modified later, for example if you create a line which is 1 cm apart from another, you can change the distance to 1.5 cm. FreeCAD will then redo everything that happened afterwards to give you the new result.

As we’ll see, this means you’ll have to give precise instructions (even when you don’t know, yet) that you can amend later.


FreeCAD Tutorial Office Chair Part 3: Mirrors and Holes

24. July, 2019

Here is part 1: FreeCAD Tutorial Office Chair Part 1: Setup and Constraints

Or go to the previous part.

Rotating Joint

To attach the wheels to the chair’s base, we need a rotating joint like so:

As usual, create a new body, add a sketch. This time, I’m going to use the YZ plane because that will feel most natural when padding (extruding) it:

You can click on the name on the left or the rendering of the plane in the 3D view. In this case, it’s easier to do in the 3D plane since that gives you an immediate idea where you’ll work.

Note that I keep the wheel visible this time so I can see that everything lines up properly.

Hm. I can’t see what I’m doing … That’s the problem with 3D. Now I could make the wheel invisible but I don’t want to (see above). If only I could turn this around … and I can. Notice the white stuff in the top right corner with the word “Right” on it? That means we’re in the “Right Side view”. We want the opposite, the “Left Side view”. You can go there with the items in the menu “View” / “Standard Views” / “Left” or by pressing the “6” key or by using the icons in the toolbar:

… Okay, where is everything???? Probably somewhere outside of the visible volume. How to fix? Menu “Views” / “Standard Views” / “Fit all” or by clicking the toolbar button. The shortcut “V, F” didn’t work for me (it activates the fillet tool).

Much better.

Design this outline:

When I was at this stage, I had a weird bug: I couldn’t select points anymore. If you look closely, you can see that the “lines” are rendered over the “points”:

It’s this “feature”: https://forum.freecadweb.org/viewtopic.php?t=36202

To fix, go to the “Model” tab, select the sketch and change the value for “Map Reversed” to “true”:

This is an instance where you notice that you’re in a 3D world. If lines and points were at the same “depth”, it would be hard to distinguish between them. That’s why the software draws points “above” the lines which literally translates to a different Z position. If you look at this from behind, it will look the other way around: The line will be “before” or “above” the point.

The view should now look like this:

or rather:

sigh Instead of just switching the depth of lines and points in the outline, they flipped the whole thing.

Oh well. Here is the fully constrained outline:

Some pointers:

  • The two starting points of the arcs at the top are horizontally constrained to the Y axis with a distance of 0 mm.
  • I’ve constrained the outer arc to 88 ° (always 90 ° is so boring). To make the inner arc do the same, I’ve constrained the closing line to be perpendicular to the outer arc.
  • All endpoints are constrained to another

Close the sketch when you’re happy and go back to the “Part Design”. With the “Rotating Joint” active, click “Pad a selected sketch” to get this:

There are a couple of minor and major problems with this. First, lot of hard edges. But more importantly, the lower part stands out:

Open the sketch again and add a fillet by selecting the corner and clicking the icon:

This gives us 2 degrees of freedom.

One because we lost a constraint (25 mm distance from origin for the left side) and the other one is the radius of the fillet.

Constraining the center of the fillet to the X axis gives a nice smooth transition from the vertical shaft to the axis. Close the sketch to get this:

Not bad. A couple more fillets:

This brought up a problem: I can’t apply a fillet to the inside of the “cover” because the software gets confused when two 1 mm fillets are applied to material that is 2 mm thick.

To fix this, go back to the sketch, change the thickness to 2.2 mm:

and try again:

Much better.

As can see, having to set up all those constraints is a pain in the beginning. But later on, when you find out you have to go back and fix something, it’s a huge time saver. Since you’ll always find mistakes late in the design, this really helps.

Rotate it around in the 3D view. Looks good, doesn’t it?

But it’s not finished. We’re missing an axis, the opposite wheel and a hole for the axis.

To drill a hole (or any shape) through a volume, create another outline inside of the same body (“Rotating Joint” is still active) and then use the use the “Hole” tool.

Now, the “Fillet004” (in my case) is in the way. We can’t see anything. Toggle it’s visibility. Again, go to the “Left” view and set “Map Reversed” of the new sketch to “true”.

Pick the circle tool, make sure you click on the origin (it will light up) and pull out the circle.

Select the circle and constrain the diameter (not the radius!) to 3 mm. It should now look like this:

Close, select the sketch and click the “Hole” tool to get this:

Mother of all scary dialogs, creating nothing from something is darn complicated … ahem

Here is the whole documentation for this monster: https://www.freecadweb.org/wiki/PartDesign_Hole

Why is it so complicated? Well, in the real world, holes can be drilled (metal) or formed (plastic when it’s pressed into a form). When drilling, the tip of the hole isn’t straight unless you use a special drill or maybe a mill. Also, some holes go all the way through while other are just depressions.

What’s worse, there is no hole. I’ve toggled visibility of the wheel and made the joint partly transparent (Right click on “Rotating Joint” / “Appearance…” / Transparency: 40). I see the circle but not hole:

So what’s going on here? Remember the “Map Reversed”? Yes, it’s interfering right now. Basically, the hole is there but it points away from the joint (into the wheel). It’s not cutting the wheel since the wheel is a different body and there is no connection between the two. That’s why the hole has no visible effect.

If we select the sketch, switch “Map Reversed” back to “false” and then click somewhere (if you’re using the keyboard: Press TAB once), we get our hole:

But there is something odd. When rotating the view around (I’ve colored the wheel blueisch and the joint yellow), the holes don’t line up properly:

It looks as if the two holes have different diameters. Why? In the wheel sketch, we used the formula to get 3/2 mm. In the outline for the hole, we used 3 mm diameter. So what is the problem?

Answer:

Why do we have to give a diameter here when we have a profile? Leave a comment when you find out.

Here is the solution:

  1. Switch “Depth” to “Through all” to avoid other nasty surprises
  2. Set “Diameter” to “3 mm”

Come to think of it, 3 mm axis for a chair seems kind of … thin. But I don’t want to change it since it’s in several places already. This isn’t good. What if someone wants to replace the axis with a weaker material and we suddenly need 0.1 mm more? As we’ll see, there is a solution for that as well. For now, let’s stick with the 3 mm axis.

All right. We have a wheel, we have a joint and a hole. Time for the second (mirror) wheel.

Select the “Half Wheel”, chose the mirror tool, select the feature “Wheel Revolution” and … ???

The orientation looks wrong but why is it yellow?

Five minutes later Okay, none of the planes work. What’s going on here?

Hint: Go back to “Model”:

That looks wrong. Mirrored should be part of “Half Wheel”, not the joint. What happened? Well, “Rotating Joint” is active (= bold), therefore the operation is added to it.

Undo. Double click “Half Wheel”. Mirror. Um … better?

But when you click around, you quickly get an error “Transformation failed” and “One transformed shape does not intersect support”. In a nutshell: The “Part Design” workbench can only create connected parts. In our case, there is a gap between the two wheels. They will eventually be connected by a metal axis but that’s not really part of the wheel.

What now?

We need a different workbench: “Part”. It has another mirror tool which doesn’t work in features but parts:

If you think about it, it makes sense: When the wheel is assembled, you will get two plastic wheels per foot.

Let’s try again. Click the tool, select the “Half Wheel”, the correct (YZ) plane (which is the one in which we designed the joint sketch):

Click OK to get:

The color looks good and all the fillets are there (they were gone when we used the feature mirror tool). But it’s inside the joint. What’s wrong, now?

If you remember in part 2, we designed the wheel outline to be 1 mm away from the Y axis:

When we mirror that on the Y axis, we get something which is again only 1 mm away from it. But we need 10 mm for the joint.

There are several solutions:

  1. We could offset the mirror copy by 1 cm using “Placement”
  2. We could move the original “Half Wheel” (not the outline) 5 mm away from the origin using “Placement”

Let’s try the second solution:

  1. Select “Half Wheel”
  2. Open “Placement”
  3. Open “Position”
  4. Change the “x” value to “5 mm”
  5. Click somewhere or TAB out of the field

Already much better. Both wheels moved away from the origin by changing only a single value. Neat.

That leaves us with centering the joint.

Open “Rotating Joint”, double click “Pad”

 

Check “Symmetric to plane”

 

to get:

Nice. From the top:

No contacts all the way through. But we have an ugly hole when looking at it from the right:

That asks for a bigger fillet. Try 5 mm:

Last step: The rotation axis of the joint (at the top).

  1. Double click “Rotating Joint” to activate it
  2. Create sketch
  3. Use the XY plane
  4. Make sure you’re in the “Top” view
  5. Hide the “Hole”
  6. Draw a circle near the top between the two wheels
  7. Constrain to Y axis (0 mm distance)
  8. Constrain vertically to X axis (18 mm)
  9. Diameter: 6 mm

The result should look like this:

Pad to 45 mm:

Change the node name to “Vertical Joint Axis”

Select the top circle and click the “Chamfer” too to get:

Finally, let’s cut a ring into the vertical axis so we can use a spring to keep it in the socket.

  1. Create a new sketch
  2. Use the “YZ” plane
  3. Use polyline to draw a triangle which bites into the axis near the end

Rename it to “Groove Outline”

Next, I need to rotate this “Groove Outline” around the center axis of the cylinder. There is no such axis but we can create one. In the “Part Design” workbench is a tool “Datum line” for this purpose.

Click on the circle where the cylinder and the joint meet (1) to get a faint yellow line (2):

This gives us the rotation axis that we need. Click OK to save the new “DatumLine”. Rename it to “Vertical Rotation Center”

  1. Select “Groove Outline”
  2. Click the “Groove a selected sketch” in the toolbar (1)
  3. Chose “Select reference…” for “Axis” (2)
  4. Click on the datum line (3)

and you should already see the groove. Click OK and we’re done:

Here is the file so far: Office Chair Tutorial Part 03

Next part: FreeCAD Tutorial Office Chair Part 4: Five Struts and One Receptacle


FreeCAD Tutorial Office Chair Part 2: Wheels

23. July, 2019

Here is part 1: FreeCAD Tutorial Office Chair Part 1: Setup and Constraints

Overview

What’s an office chair without wheels? A wreck. So let’s give them some:

And done. In our next part, we’ll see how we can create the whole foot (two wheels with an axis and a rotating joint to attach to the base) … What?

All right.

As with the rectangle from part 1, we need an outline for the wheel. But before we can start, what should we do with the rectangle itself? We could delete it or create a new project or rename it. I suggest to rename it so you have something handy where you can play around.

Select the node “Body” and press F2 or right click and select “Rename”. Just start typing the new name. That solves half of the problem.

Sketching an Outline

With that out of the way, we need a new body for the wheel. Make sure you’re in the “Part Design” workbench

"Part Design" workbench selector

“Part Design” workbench selector

and click “Create new body”. You might get an error:

That happens when you create a new body while another is currently “active”. Most operations work on the active body. That way, you don’t have to select the target of your operations all the time. Just click OK to get a new, active “Body001”.

Rename it to “Half Wheel”. Why half? It’s good practice to be lazy. Since most chairs have symmetrical wheels (one on each side of the joint), we’ll just draw one of them and then ask the software to create a mirror copy:

Neat, right?

With the body “active” (= the name is bold), create a sketch. If the “Half Wheel” isn’t active, double click on it.

Again, we chose the XY plane:

Hm. I don’t know about you, but I don’t want to see the rectangle while I’m working elsewhere. If we could just hide it … yes, we can.

Go back to the “Model” tab, right click on the rectangle node and select “Toggle visibility” (shortcut: Space):

Much better! Pick the polyline tool and create a rough outline:

The bottom will become a hole for the axis of the wheel, the top is the surface on which the wheel is rolling. As you can see, FreeCAD already created a ton of constraints: Horizontal, vertical and “fix point on object” ones. In my case, it’s already complaining:

I clicked on the link in the solver message “(click to select)” and the offending constraints are green. It’s a vertical constraint in the top left and a horizontal constraint in the bottom right.

I could delete them but I feel those constraints are correct. Instead, the “fix point on object” constraints might be wrong because my outline has no freedoms left in it. If I pick the right side, I can’t move it because the bottom point is nailed to the X axis. Since the dimensions are most certainly wrong, this is bad. Also, the wheel will be stuck in something. Imagine an axis going through the origin. This axis will be in some kind of holder. If the wheel touches the Y axis, it will probably touch whatever holds the axis. We don’t want that kind of grinding, so we have to move the four points on the Y axis away and the “point on object” constraints prevent this.

Let’s delete all of these constraints:

Using Dimensions

Ah … freedom. Ahem. Let’s start with some simple constraints to get the sizes roughly right. The rolling surface will take all of the weight, so let’s give it 3 mm. The same is true for the material holding the axis. The “side” of the wheel will just take pressure along the material (no torsion), so it can be 2 mm. To save material on the (metal) axis, let’s not extend it all the way out to the side of the wheel. Let’s make the wheel 10 mm thick and 50 mm tall. With these dimensions, we can make the hole for the axis 6.5 mm deep. Deep enough for a good hold:

Note that the height is half of 50 mm = 25 mm.

But it doesn’t look great. Click on the dimensions (the numbers) and drag them until you can read everything properly:

Much better. The 2 mm at the top isn’t great but good enough for now. Let’s move the wheel outline to the correct position. The two bottom dots should be anywhere on the X axis. To achive this, select one of them and the origin and constrain the vertical distance to 0 mm:

Above, we said that we want the wheel to be away from the holder of the axis. Select one of the two vertical points near the bottom left and constrain the horizontal distance to the origin to 1 mm:

sigh Wrong way again. To fix:

  1. Delete the constraint
  2. Move the vertical line to the other side of the Y axis
  3. Apply the constraint again

While dragging the line, you’ll notice two things:

  1. The whole “box” at the bottom moves along
  2. The side and rolling surface stay in place

FreeCAD tries to do what you want with the least amount of change.

Using Formulas

Let’s finish the hole for the axis. For this, we need to assign a height. For a 3 mm axis, this would be 1.5 mm. Which we could calculate in our head but how about an axis which is 7.125 mm? To spare use the humiliation, let’s use the little “f(x)” button in the text box. The formula would be “3/2”:

Nice:

To denote the fact that this is a calculated value, the constraint has an orange color. This leaves me with a single degree of freedom left. If you look closely, you’ll see that the bottom and top parts have different widths. If you click on the outline and drag it, you can see that the freedom is only in the length of the horizontal lines at the bottom. There are different ways to fix this:

  1. We could give the the bottom a total width of 10 mm
  2. We could constrain the length of the white line on the X axis
  3. We could constrain the length of the second of the four horizontal white lines (from the bottom)
  4. We could constrain the horizontal distance between the two leftmost vertical lines

I’ll go for the last approach because that allows us to easily modify the width of the wheel and the gap between wheel and axis holder and, later, the top cover of the wheel:

I used a 0.5 mm horizontal constraint.

FreeCAD is happy with the result and so am I. Close the outline to go back to the “Part Designer”

Revolve

To turn the outline into a wheel, use the tool “Revolve a selected sketch”. The sketch should be selected; if not, make sure it is:

Now that doesn’t look right:

By default, FreeCAD rotates around the vertical sketch axis (see the “Axis” combobox). Change that to “Horizontal sketch axis” and you have a wheel:

Make sure the rotation angle is 360 (= full circle) and “Symmetric to plane” and “Reversed” are both off.

After clicking OK, our tree looks like this (I’ve opened the “Revolution” node):

As you can see, FreeCAD remembers our operations: We started with the sketch (outline), then rotated it.

Fillets

As wheels go, this one is nice but the edges are too sharp. They would feel bad to the touch and would easily break (they would also be very hard to produce). Let’s round them. Select the rim and click the fillet tool:

That looks much nicer:

Since we want the same fillet on the outside, click “Add ref”, select the other rim to get:

Now for another fillet on the inside (1) with a radius of 3 mm (2):

Too much? Double click “Fillet001” and change the radius to 2 mm:

Now, I want the same on the axis hole. Double click the fillet again and add the additional edge:

All right. This looks like a nice wheel which won’t break easily:

Note that I’ve renamed most nodes to make it easier to tweak the design later.

Project file: Office Chair Tutorial Part 02

Next part: FreeCAD Tutorial Office Chair Part 3: Mirrors and Holes


Why Apple Sucks

10. November, 2017

People often ask my why I hate Apple products. My answer: “I’m not compatible.”

I was always looking for a good example what I mean. In my hands, Apple products crash, show weird behavior or important features are utterly broken.

Case in point: Apple has released an “everyone can write an App” course on iTunes. Here is what I did:

  1. I clicked the link
  2. itunes.apple.com opened in my web browser
  3. A few seconds, nothing happened
  4. Then I got a message box: “Do you want to open this link in iTunes?”
  5. Uhh… yes?
  6. iTunes opened. Showing my music library. Where is the product that you were supposed to open? Thanks for wasting 10 seconds of my life.
  7. Clicked the link again.
  8. Clicked “yes” again
  9. Now iTunes shows a page with “Swift Playgrounds”. Probably what I wanted to see, I’m not sure anymore.
  10. I click on the product.
  11. iTunes opens a web page in my browser. WTF???? What’s the point of having iTunes when it can’t even download something!?
  12. The web page says “Please install iTunes.”
  13. I give up.

That’s one example in which Apple products waste my time. It’s almost always like that.

Apple, I hate you.


Artificial Ethics

24. October, 2017

While watching this video, I wondered: We’re using machine learning to earn money on the stock market and to make computers understand speech. Why not ethics?

Around @26:00 , Isaac talks about ways to develop AIs to control androids. He would like to use the safe approach of manual programming all the specific details to create an AI.

The “manual programming” path has been tried since 1960 and it’s now deemed a failure. The task is simply too complex. It’s like manually writing down all possible chess positions: Even if you tried, you’d run out of time. Machine learning is the way to go.

Which means we have to solve a “simple” problem: Encode the rules of ethics. That is, a machine learning algorithm must check itself (or be checked by another algorithm) against a basic set of ethical rules to determine whether “a solution” to “a problem” is “ethical” (quotes mean: “We still have to figure out exactly what that means and how to put it into code”).

Just like intelligence, ethics is somewhat of a soft and moving target. Fortunately, we have a huge body of texts (religious, laws, philosophy, polls) which a machine learning algorithm could be trained on. To test this machine, we could present it with artificial and real life incidents and see how it rules. Note: The output of this algorithm would be a number between 0 (very unethical) and 1 (very ethical). It would not spit out solutions on how to solve an ethical dilemma. It could just judge an existing solution.

It’s important that the output (judgement) is checked and the result (how good the output was) is fed back into the algorithm so it can tune itself. Both output and feedback needs to be checked for the usual problems (racism, prejudice, etc.).

Based on that, another machine learning algorithm (MLA) could then try many different solutions, present those to the ethics one, and pick the best ones. At the beginning, humans would supervise this process as well (feedback as above). Eventually, the MLA would figure out the hidden rules of good solutions.

That would eventually lead to ethical machines. Which would cause new problems: There will eventually be a machine, very impartial, that “is” more ethical than almost all humans. Whatever “is” might mean, then.

Related articles:


Your Phone Should be Your Butler

18. October, 2017

A lot of people share private details with the world without being aware of it. For example, they take nude pictures with their phones (NSA keeps a copy, just in case) or they sell the phone without wiping it properly, allowing the next owner to get a good idea who you are, or they install apps like the one from Facebook which ask “can I do whatever I want with anything I find on your phone?” and people happily click the “Yeah, whatever” button (a.k.a “Accept”).

When people use modern technology, they have a mental model. That model tells them what to expect when they do something (“press here and the screen will turn on”). It also contains other expectations that are rooted in social behavior. Like “I take good care of my phone and it will take good care of me (and my data)”.

That, when you think about it, is nonsense.

A phone is not a butler. In essence, a phone is a personal data collecting device with additional communication capabilities. But the main goal is to learn about you and then manipulate you to buy stuff. It’s about money. Companies want it, you have it, they want you to give it to them. Anything else only exists to facilitate this process. If pain would increase revenue, we’d be living in hell.

Case in point: Speech based input. When you click on a page, that doesn’t tell much about you. When you use your finger, the phone can at least feel when you’re trembling. Are you angry or enthusiastic? We’re getting there. But your voice is rich with detail about your emotional state. More data to milk to make you perfect offers which you simply don’t want to refuse.

A butler, on the other hand, has your interests in mind. They keep private information private instead of selling it to the highest bidder. They look out for you.

The source of the difference? You pay a butler. (S)he is literally working for you. On the phone, a lot of people expect the same service to happen magically and for free. Wrong planet, pals.

Wouldn’t it be great if phones were like butlers? Trustworthy, discreet and helpful instead of just trying to be helpful?

I hope we’ll see more technology like the app Nude (which hides sensitive photos on your phone).

Related:


Spreading Bad Software is Immoral

29. September, 2017

From Fefe’s Internet Security Days keynote:

Schlechte Software zu verbreiten ist unmoralisch.

Translation: Spreading sloppy software is immoral. It’s like producing waste and dumping it into a river. Properly handling would be expensive, illegal dumping saves money and turns it into a SEP.

Writing sloppy software is similar. Instead of investing time into doing it right, you try to externalize costs: The client will somehow (have to) deal with it. They either have to pay you to make it better the second time or they have to spend time and nerves every day to work around shortcomings.

When we see someone dump toxic waste in a forest, most people are outraged. The same people, when they are managers of a software company, sign contracts that define the delivery date of something before knowing the requirements. Software developers, desperately trying to feel and look competent, shout “Done!” only to collapse into a morose heap of self-pity after a minimum of poking what this “done” really means.

Fefe is arguing that doing it right is as expensive as doing it sloppily. I have the same hunch. I’ve seen numbers on the  Standish Group Chaos Report (alt: Wikipedia, German) which gives a good indication how much failing projects cost: Around 20% are a total waste of money since they are eventually killed, 52% cost twice as much, only 30% make it in time, in budget and with the promised feature set (note: I bet at least half of those 30% made it because the feature set was reduced/readjusted during the project).

If you assume that in 2014, $250 billion was spent on software development in the US, that means cost of $50 billion on failed projects alone. That is our money. Your’s and mine. Companies don’t magically get money, they sell products and each wasted project eventually means additional figures on some price tag in a shop.

Then we have $125 billion which should have been $62 billion but another $62 billion was necessary to make it to the finishing line. It’s a harder to tell how much of that is wasted. You can’t count projects that were simply underestimated or feature creep – additional features cost additional money, so it’s out of budget but not wasted. Let’s assume $10 billion (less than 10% waste overall) in this group.

In a perfect world, that would mean we could spend 24% ($60 billion out of $250) more on software quality without any additional cost.

Related articles:


Wrong colors in Windows Photo Viewer / Falsche Farben in Windows-Fotoanzeige

18. September, 2017

When colors in the Windows Photo Viewer (Win 8 to 10) look oddly wrong, it’s probably because of something called “color profile“.

Solution:

  1. Open “System Control” (Systemsteuerung)
  2. “Color Management” Farbverwaltung
  3. Select your monitor
  4. Check “Use my settings for this device” (“Eigene Einstellungen für das Gerät verwenden”) (otherwise, you can’t click anything at the bottom)
  5. Hinzufügen
  6. Select “sRGB IEC61966-2.1”
  7. Click “Set as Default Profile” (“Als Standardprofil festlegen”)
  8. Repeat for each monitor
  9. Restart Photo Viewer (Fotoanzeige)

Risks of Artificial Intelligence

10. November, 2016

There is a growing group of people arguing how AIs will one day kill us, either by loving or hating us to death. I find their arguments interesting but lacking an important factor: AI is created by (a few) humans.

That means AIs will inherit features from their creators:

  1. Humans make mistakes, so parts of the AI won’t do what they should.
  2. Each human defines “good” in a different way at a different time.
  3. The road to hell is paved with good intentions.

My addition to the discussion is thus: Even if we do everything “as right as possible”, the result will still be “surprising.”

Mistakes

Mistakes happen at all levels of software development. They can be made during the requirements phase, when the goals are set. Requirements often are vague, incomplete, missing or outright wrong.

Software developers then make mistakes, too. They misunderstand the requirements, they struggle with the programming language, their brain simply isn’t at the top of its abilities 100% of the time.

When it comes to AI, the picture gets even more muddled. Nobody knows what “AI” really is. If two people work on the same “AI” problem, their starting set of assumptions is very different.

In many cases, we use neural networks. Nobody really understands neural networks which is the key factor: They “learn” by themselves, even if we don’t know what exactly. So they come up with “solutions” without a lot of effort on the human side which is great. It “just works”. Many such projects failed because the neural networks tracks a spurious correlation – something that happens to us humans every day.

Good

What is “good“? Is it good when you add a feature to the software? When you’re really uneasy about it? When it’s immoral? Illegal? If it means keeping your job?

Is the success of a project good? What is “success”? It’s completed within time? Within budge? It’s somewhat completed at all? When the result is a rogue AI because too many corners were cut?

Unintentional Side Effects

The book “Avogadro Corp” tells the story of an AI which is created on purpose. The creator failed to take into account that he’s not alone. Soon, the AI acquired resources which it was never meant to have. People are killed, wars are prevented. Is that “success”?

Many people believe that strong leaders are “good” even when all the evidence says otherwise. They translate an insecurity into a wishful fact. If the wish of these people – often the majority – is granted, is that “good?” Is it good to allow a person to reject medicine which would save them because of personal belief? When all evidence suggests that the belief is wrong? Is it good to force happiness on people?

We want AIs to have an impact on the real world – avoid collisions with other people and cars, select the best medicine, make people spend more money on things they “need”, detect “abnormal” behavior of individuals in groups, kill enemies efficiently. Some of those goals are only “good” for a very small group of people. For me, that sounds like the first AIs won’t be created to serve humanity. The incentive just isn’t there.

Conclusion

AIs are built by flawed humans; humans who can’t even agree on a term like “good”. I feel that a lot of people trust AIs and computers because they are based on “math” and math is always perfect, right? Well, no, it’s not. In addition, the perceived perfection of math is diluted by greed, stupidity, lack of sleep and all the other human factors.

To make things worse, AIs are created to solve problems beyond the capability of humans. We use technologies to build them which we cannot understand. The goals to build AIs are driven by greed, fear, stupidity and hubris.

Looking back at history, my prediction is that the first AIs will probably be victim of the greatest mental human power: ignorance.


%d bloggers like this: