<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19255/about-nrf-sdk-naming-conventions</link><description>Being a person with a poor name memory, I am really frustrated with the nRF SDK&amp;#39;s naming conventions. For example, let&amp;#39;s take a function 
 bsp_btn_ble_on_ble_evt()
 
 Is that a descriptive name, eh? Every time I hit a function name, or symbol, like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Feb 2017 10:18:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19255/about-nrf-sdk-naming-conventions" /><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74614?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2017 10:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a6bda80-a7a3-438b-b5c9-9867cf2adf6b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Thanks for the input Jarmo.&lt;/p&gt;
&lt;p&gt;Being a hardware company you are probably correct that many of the drivers are written &amp;quot;from the bottom up&amp;quot; ;)
We want the software drivers to be as flexible as possible, and support all the hardware features available, which makes them more complex than needed for many customers.&lt;/p&gt;
&lt;p&gt;We do support alternative software stacks, such as mBed or Arduino, if people want more intuitive API&amp;#39;s, but the SDK will always be the place to go if you need more flexibility or need to get new features faster.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74613?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2017 12:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acd410f9-12e4-48c1-8fdd-54fd36932cd0</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Thank you for your answer and the time! I do understand that having consistent rules that do not change when &amp;quot;the game is already running&amp;quot; are important for that kind of large software process.&lt;/p&gt;
&lt;p&gt;Well. I am not sure what&amp;#39;s actually wrong with the SDK, but everything feels too hard and complicated. Making an application takes two to ten times the time needed to implement same thing with Arduino code. I have written code for nRF5 now over two years, about ten to twenty different kind of customer projects.&lt;/p&gt;
&lt;p&gt;After not being able to adopt the thinking behind your SDK, I eventually started to write an extra software layer hiding all that nRF-SDK complexity. For me, it looks like the SDK is written with an approach &amp;quot;we&amp;#39;ve got a hardware, let&amp;#39;s write the software&amp;quot;. Instead, what I would look for is to first think what a programmer really needs, and write the API from that point of view.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74612?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 15:35:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eaf9f01d-f498-4adb-b188-64e47d9f18a0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jarmo&lt;/p&gt;
&lt;p&gt;Good function naming is a challenge, and it is very hard to find a set of rules that works great in all circumstances.&lt;/p&gt;
&lt;p&gt;When it comes to the use of underscore vs camelcase then underscores is by far the most common in the industry for C code, and is used by standards such as Misra C or K&amp;amp;R.
Camel case is more common in object oriented languages such as C++ and Java, and all our Android examples use camel case.&lt;/p&gt;
&lt;p&gt;The reason for using abbreviations is to shorten the function names. Our internal guide lines put limits both on the length of function names, and on entire code lines, to avoid having to scroll to the right when reading code. While having long and descriptive names might help to understand that particular function the first time you read it, it will make it harder to get an overview of the code, since you have to break up code lines to avoid them being too long.&lt;/p&gt;
&lt;p&gt;We also have a requirement to prefix all function names with the name of the module, which means the module name should be as short as possible to avoid breaking the function name length limit.&lt;/p&gt;
&lt;p&gt;As I said in the start all naming conventions have pro&amp;#39;s and cons. In the end we try our best to ensure that we are consistent within the Nordic libraries, and that we follow industry standard as much as possible without needlessly reinventing the wheel.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74611?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 11:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87b73fb6-5138-493d-a5de-6c661f0d7333</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Yep. As a kid, I might have agreed with you, since I quickly learned all the needed magic words to program ZX-81, VIC-20, Commodore 64, Amiga etc (and actually, also Unix). Nowadays, it is much harder to learn to memorize new programming language details, and I need google a lot. On the other hand, the programming vocabularity is also much higher, today.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74610?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 10:27:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac75728b-1c5d-4ba8-bce4-73cbcba375e8</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;As you said, I see your point - but don&amp;#39;t agree.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74609?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 10:05:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:334884ba-3359-441d-982d-73b432af6666</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;A nice article.&lt;/p&gt;
&lt;p&gt;A matter of style, partially yes. If you prefer deep (slow) learning curve then choose abbreviations, but preferring easy starting puts you choose clear wording.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74608?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:59:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb2732f-f982-471c-be8c-b72bc55ecd4c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;You are clearly not a UNIX fan, then!&lt;/p&gt;
&lt;p&gt;This is an argument that has been running - and will continue to run - forever amongst software developers &amp;amp; computer scientists.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://haacked.com/archive/2006/02/08/OnReligiousWarsinSoftware.aspx/"&gt;haacked.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At the end of the day, it is just a matter of personal style/preference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74607?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:30:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec4a8c9b-f15c-4006-8daf-7b1c9204706e</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Yes, thank you for your opinions. I see your point but cannot agree.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74606?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:30:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:176ee569-764c-4115-ba2d-fb7ba25483da</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Some people would argue that all those underscores make the name too much work to type, and would prefer&lt;/p&gt;
&lt;p&gt;bspBtnBleOnBleEvt()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74605?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb1a9702-225b-495a-bbfe-998c0264ffc9</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;No, I am not employed by nor in any other way affiliated with nor sponsored by Nordic.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;after you have worked intensively, say one year, with Nordic&amp;#39;s SDK, you get familiar with those acronyms&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don&amp;#39;t find any of those abbreviations to be obscure or cryptic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;#39;ble&amp;#39; is a widespread abbreviation for &amp;#39;Bluetooth low energy&amp;#39;;&lt;/li&gt;
&lt;li&gt;&amp;#39;btn&amp;#39; is a common abbreviation, and no major leap from &amp;#39;button&amp;#39;&lt;/li&gt;
&lt;li&gt;etc&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You will find similar abbreviations throughout competitors offerings.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;which one makes more sense: &amp;quot;btn_ble&amp;quot; or &amp;quot;bluetooth_button_module&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Also ask which one they would rather have to type - &amp;#39;bsp_btn_ble_on_ble_evt&amp;#39; or &amp;#39;board_support_package_bluetooth_button_module_bluetooth_event_handler&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;quot;Taking the vowels out&amp;quot; is a common way of &amp;quot;compressing&amp;quot; words in making symbol names in software development in general...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74604?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da1982e8-64b9-4f51-8f2d-3f21651d8d35</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;This is not the first time I am complaining. If you are not Nordic employer, I think continuing is quite fruitless.&lt;/p&gt;
&lt;p&gt;Of course, after you have worked intensively, say one year, with Nordic&amp;#39;s SDK, you get familiar with those acronyms. But what is the case with all the beginners? For example, try asking some random people which one makes more sense: &amp;quot;btn_ble&amp;quot; or &amp;quot;bluetooth_button_module&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About nRF SDK naming conventions</title><link>https://devzone.nordicsemi.com/thread/74603?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 09:05:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a7d7ed2-ffef-44ab-a0ae-b4df21f09847</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t seem unreasonable to me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It is part of the Board Support Package - hence the &amp;#39;bsp&amp;#39; prefix&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is part of the BLE Button Module - hence &amp;#39;btn_ble&amp;#39;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is the handler for BLE events; ie, it is called on each BLE event - hence &amp;#39;on_ble_evt&amp;#39;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thoroughly descriptive!&lt;/p&gt;
&lt;p&gt;So how would you have it named?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/s110/html/a01272.html"&gt;developer.nordicsemi.com/.../a01272.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>