Zaki Mirza’s Blog

Icon

… About software and beyond!

Late Night Bloggin’: Bentley and the ‘double’ trouble quiz


Working at Bentley has been a great experience for me. Partly because of the great enviornment but mostly because of the problems I faced during coding one of the new features in the Microstation PlantSpace Designer Series. The problems ranged from  creating quick documentation solution to document lots of vb6 codebase in python to dealing with a massive Microstation API to solving a series of problems that required inventing new data-structures, dealing with graphs and adjacency lists and developing algorithms to traverse the graph in a specific manner which wernt supported in the API. (i shall be writing about them soon).

Since i was dealing with 3d elements, handling points in 3d space was unavoidable. Engineering applications (such as the CAD/CAM category, in which PSDS lies as well) are designed to cater a divesture of standards in terms of metrics used. In the core of the software though a uniform format is used to represent values. For example a point in 3d space can be represented in many differnet formats (inches, feet, fractions etc). The format used to represent the same point in the underlying software architecture in PSDS is usually a ‘double’ (since we’re working in C – or a subset of C called MDL: microstation developer language, and yes i was creating my own adjacency lists in C and traversing them recursively). So basically the x,y and z coordinates of the point are representated as a structure of 3 doubles.

One way to compare two points (and well the most obvious way) is to calculate the distance between the two points using the distance formula. Thats all well and solved and thats not the quiz. The quiz is, given two double values, how do you compare the two to N decimal places? In other words how would you compare two points to see if they are “close enough”. (and that can be anything from being equal to 5 decimal places or being absolutely equal).

Advertisements

Filed under: Late Night Blog, quiz, , ,

One Response

  1. Ali says:

    How was working at Bentley different from working at Uraan? How do the two companies compare in:
    a. Size
    b. Teams
    c. Hierarchy
    d. Nature of projects
    e. Project processes

    Total marks: 10

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

RSS Google Shared Items

  • An error has occurred; the feed is probably down. Try again later.

RSS Google Reader Starred Items

  • An error has occurred; the feed is probably down. Try again later.

Top Clicks

  • None
%d bloggers like this: