Raw Key Code for Function Keys

I figure out key codes for function keys from F1 to F12 on Mac.

  • F1 : 122
  • F2 : 120
  • F3 : 99
  • F4: 118
  • F5: 96
  • F6: 97
  • F7: 98
  • F8: 100
  • F9: 101
  • F10: 109
  • F11: 103
  • F12: 111

They are not related to ASCII table at all.
Code marked as ‘solution’ or ‘answer’ here doesn’t care of them. They are all converted to a printable characters, ^P. So, a table created with the method in the StackOverflow can’t differentiate each of the function keys. So, if you want to differentiate them, customize value saved there using the table above.

It turned out that the database solution, 4D, also had such values for the function keys.
So, it says that the values above is not only specific to my keyboard, Logitech  K760.

(It’s surprising that 4D is still alive.)

parent selector in Chrome as of today

parent selector in CSS is said to be included in new CSS draft as has() class. A stack overflow comment mentions about it.

Also, on this blog, the author says a reverse selector or parent selector is available with IE and WebKit-based browsers. Chrome was a WebKit-based until Google exited from the WebKit herd. However, in many document, Chrome is mentioned as WebKit-based and there are still lots of WebKit-ness there.
However, as of today, on my Chrome browser on Windows, this parent selector, <, is not available.The version of Chrome browser on my machine is Version 47.0.2526.106 m.

 

 

Way to figure out if a target memory is good to read/write?

Hmmm… IsBad*Ptr() functions are deprecated in Win32 API! Ok.. but what if you need it? Actually there is no reliable way to figure out if a pointer is valid or not. If you suffer such problem, it should be fixed at the caller side or the side where it prepared the pointer.

But.. what if you really need it even though you sufficiently considered that?
What if some external code gives you a bad pointer?

Here is a good blog post, “There is no point improving the implementation of a bad idea.”

There is a simple drop-in replacement and it’s.. reasonable.

Windows 10 can be run on Raspberry Pi!

This is great movement by MS.

Unix programming on this kind of one board PC is interesting enough to people like me, but for most of people, if things can be developed as Windows app, it can attract more audience!

Now, because MS Windows has a build for ARM, they finally allowed to run Windows 10 on Raspberry Pi AND you can develop app with Visual Studio!

It’s great!!!!

it can be also great ‘learning’ kit for Windows device developers.
Well, I know, I know. There is no good reference book for developing Windows device drivers. MS’s own one is too old, and some info there can’t be even applied.
However, at work, your managers can be people who don’t major in Engineering or Computer Science. So, they would think like “This is S/W program, and you are a S/W engineer. Why can’t you implement it?”
it’s not usual case S/W developers put their hands on device drivers. It’s usually done by people who major in EE, not CS or CSE.
(Well, nowadays, even CSE folks can do it, because embedded programming was now included in their curriculum.)
Also, device driver development requires information about target H/w. For example, when you want to write your own mouse driver for some logitech mouse, You may not be able to get information about the target device. there are some common interface, but may not.
(Think of web cams, for which standard was not fully prepared or even though there was standard, it was difficult to get informaiton on it. – remember MACAM? )
Also, a person who never developed device driver don’t know what information he needs.

But anyway, with this kind of device, at least people can try and play. Well.. yes. You can also study such stuff with normal PC box, but Raspberry Pi would encourage you to do so more because it would not have device drivers you want use with the raspberry pi. :)

Marketting effort based on wrong information

Well, this topic is not about programming, but because it’s related to determining what platform, API, SDK or whatever you need to choose for upcoming projects, I would like to talk about it.

A few years ago, I worked for a company. They didn’t have good idea on S/W development. They IMPLIED that they had a S/W development team and I will be a lead engineer, but when I joined, it turned out that it was not. They had a group of people, but what they do is IS. they wrote code for business-oriented intranet web site. I’m not saying that they are not S/W engineers. However, they are not S/W engineers for S/W products. So, the way they work, attitude they had, and so on were different from those S/W engineers for S/W products usually have.

Their agile is focused mostly on scrum instead of sprint or engineering topic like what to implement, how to implement, what’s the goal etc. In other words, theirs is more about how to build up people and how to spend time just like construction workers rather than engineers who need to solve problems and thus implement functionalities.

People here in the US look to be mostly driven by ‘charaterism’ or memorizing definition. They don’t seem to have an eye for seeing a person whose knowledge is already melt into him and his working style and knowledge became himeself already. If you are not a fresh graduate, you can forget definition. However, your body knows them. People here don’t seem to see it.

I was the person who was exposed to Agile development ‘technique’ in its early stage in early 90’s. I met some of original people who brought up the idea. At that time, people with S/W engineering in their major didn’t call Agile as ‘methodology’ but called it as ‘technique’. There are good reason. Agile is technique which amend spiral development methodology.
Actually Agile was practiced a lot in S.Korea whether people realized that they pursued it or not. I met some people at that time, who happened to say “Well.. it’s the technique we already adopted and used!”
Yes. It did. However, people in academia built some castle around it to fortify their ‘profession’ and made it sound like something ‘professional’. It’s usually the moment people start to introduce ‘terminology’. Although concept is nothing new, by making ‘terminology’ they start to make people who don’t adopt or know the terminlogy a stupid or ignorant on that issue. Of course, ‘terminology’ is important to share idea. By using common ‘words’, communication becomes clearer. However, making ‘terminology’ serves for other purpose also. And nowadays this aspect looks to prevail. It’s to make people who already know what they are but don’t know the terminology unprofessional and ignorant.

However, don’t play that game. Respect others in engineering. People even can use same terminology to mean different things or use different terminology to mean the same things. So, terminology is not the key. What matters is their meaning and philosophy what the interested topic means to be, like Agile development.

Hmmm.. I’m sorry. It looks to me what I talked so far is kind of off-topic.
However, it’s related.

What I noticed is that some group of professional ‘marketing’ people tried to sell their idea by propagating false information.
They said like, “Apple will give up Mac. Take a look at what Apple is doing! They don’t announce newer Mac Pro! We have heard that Apple will stop developing Mac in favor of their iOS platform.”

Well… It’s true that Apple didn’t touch Mac Pros and other Mac quite for a while when they said as such. Although Apple updated MacBook lines and iMacs, but those updates were minor ( which is quite common in PC world, like just to upgrade memory, CPU and so on ). To make things worse, Apple didn’t update their Mac Pro line for a while.
However, after several months Apple introduced the cylindrical Mac Pro.
They rethought about the Mac Pro. I liked the old Mac Pro, because it’s more expandable and have lots of expansion options with lots of internal bays and their design allowed each replacement of components.
However, with the new cylindrical Mac Pro, they introduce some cool factors, but diminishes flexible expandability. The trend followed by prohibiting memory upgrade by soldering memory on their motherboards for MacBooks and even Mac mini! Their rationale was that ‘Thunderbolt’ can serve for the most needs for ‘expandability’.

Wait. Doesn’t that sound familiar?

Apple II vs. Mac

Mac introduces ‘ports’ and closed the lid, while Apple IIs provides many internal slots. Apple IIgs provides Mac-like ports as well as Apple II’s slots which was strong sales point for Apple II under the name of ‘openness’
Later, Mac had SCSI ports, which was way more expensive than internal upgrade option like IDE etc available in IBM compatibles at that time.
Well, as a person who knew the technology, SCSI was superior, but more expensive. It can be a ‘must’ option for some high-end market, but for the most of people, it’s a hindrance.

Anyway, whatever happening in Mac was enough for those marketing people to say “Apple is migrating from Mac model to iPad model and will eventually give up Mac.”

Well… then how about Xcode? To develop apps for iOS, they needed a computer. Well.. yes. NeXTStep, White NeXT, OpenStep. Apple can always introduce Xcode on Windows. ( Actually there were rumors on it! )
It’s possible scenario.

However, it was not clear at that time. However, those marketers pitched with that ball very hard and the company I worked for at that moment was filled with people who didn’t like Apple. So, they could be easily bought by such false marketting.

Depending on other companies’ future is very risky. So, it’s the moment to bring up ‘inner talk’ with the ‘other’ company, which is Apple. My upper manager should have contact Apple directly if the company was serious about the futrue of Mac platform. It also applies to Windows nowadays too. I remember that Windows 10 is the last Windows several months ago, although nobody looks to care about it.
But they didn’t. I wonder if they had strong will to pursue the project they intended to do at first.

I wonder how they, the marketers who visited the company I worked for at that moment, think now. Will they be ashamed of themselves? No, I don’t think so. If they are such people, they wouldn’t throw what they think inside their mind that easily. They were anyway people who tried to promote their solution to the company I worked for anyway. So, it could be clever ( I can’t call it wise ) strategy for them. It’s just foolish that ‘our’ people were bought by them so easily.

I’m Korean. Koreans are not so showy as Americans or people who have background in some other countries. However, here in the US, if I confront other people without by talking much like we usually do in Korea, thinking that grinning and nodding, or expecting that people in this field of intdustry is surely know and agree with what people talk about, it will bring some problems. ( and it did. ) What is funny is that in LA, people encouraged me to talk more. Here in US, unlike Korea, people don’t expect others would know this and that when the ‘others’ are the ones who have worked in this industry long time. In Korea, we take it for granted that people already know this. When it turned out that he or she doesn’t, we explain on those to them at that point ( or if a bold and political person at work, they weaponize such knowlege, but I’m talking about ordinary people with good mind. ) So, here in the US, I’m expected to expose what I’m thinking. However, here in the new place, it doesn’t seem to so. People tries to put me down as much as possible and interrupt while I’m talking although it’s not situation where it requries immediate clarification or something. I’m not a person who talks unneccessary things to show off what I know. People in LA was not like this. There are some people like this, if they are bold. But there were some consensus in the companies I have worked for that they see those kind of people as ‘bold’ people.

Anyway.. I’m putting out too many different things in this post..
So, let’s go back to the topic.

Marketting and deciding direction of development on such haze information is not good. When they need to clarify future of some technology, they should contact companies like Apple and MS ( when the issues are on such companies head for ). Although Apple and MS, for example, would not clearly say those, you can feel or smell something by talking them.

People who have known me for long time will know that I have very good sense about those. When others said no, I said Intel version of OS X and Mac, and what’s the real purpose of Safari on Windows, etc.
That’s the sense people can get when one’s knowledge or experience in one field goes deeper. But here in the US, people don’t seem to have such sense, and thus can be pursuaded by such false marketting effort very easily. It also affect when hiring people and contracting with some outsourcing companies. When I came to the US, I was amazed by their interview questions compared to how Samsung, LG and Hyundai did or most Korean companies do. However, I now see their, i.e. US companies’, shortcomings also. If audience is different, they should ask differently.

Well… similarity with the Agile development case?
“Insight”
People here doesn’t look to have their insight accumulated over time but just relay on ‘surface’ knowledge.

Ah.. I just pushed out some mixed ideas and topics in this post. Probably it’s better to move to my Hot Potatoes blog. Well… but this is related to S/W engineering… So..

 

 

 

 

Revisit 3D : Immediate Mode and Retained Mode

As far as I remember, it was QuickDraw 3D which introduced ‘retained’ mode in 3D graphics for the first time at least in the level that people who learnt 3D graphics programming generally. When QuickDraw 3D was announced, Apple mentioned it was researched at MIT and they adopted the concept if what I remember is correct.

I remember Apple’s demo application with VW Golf and some other objects. However at that time, Macintosh was very expensive ( in S.Korea, it costs 3 times to how it did in the US. ( +100% for importing, +100 % for profit for Elex, the importer and distributor of Mac in S.Korea, and original price ). So, I couldn’t affor it after Macintosh LC. Moreover Mac was dying and I didn’t want to spend that kind of money.

However, I would like to try QuickDraw 3D. One of the good concept was this retained mode ( in addition to traditional OpenGL-like immediate mode. )

So, here is a recap for the concept.
The Basics of QuickDraw 3D Geometries

Also, at that time, MS also adopted the concept ( for competition? )
And… they still have it.

MSDN : Retained Mode vs. Immediate Mode

Also, OpenGL also has the mode!

It has been long time that I handed off programming in 3D graphics. It was one of my favorite area, but it was not useful at work and I couldn’t afford my time in it any longer since my moving to the US.
However, for sometime I kept sniffing in it and have seen how OpenGL had been evolved and kept following the latest trend in 3D programming, like vertex shading etc, but I didn’t write code with them.

Now, it’s time to do. So, I need to catch it up!

Google and their web initiatives

What I don’t like about Google is that they try to kill or diminish interest in platform native development.

At first, they weren’t. They introduced picasa program and picture-sharing chatting/SNS program. I was amazed by their insight for GUI and elegant/cute GUI design. However, they shortly decided to kill the picture sharing chatting program ( the rationale was that the program was not quite popular, as far as I remember.)
Then they reduced expose of Picasa program and promoted Picasa web service. Then they started to encourage web development and delayed their SDK development for C/C++.

I don’t like such direction. I know how current generation of developers think about native programming. However, C/C++ programming is fun and you can learn about computers and how it works more. Script language is easy to use, but also they are resource hogs and slow. Well, nowadays CPU is very fast and cost of memory goes down. Also, Google enhanced JavaScript engine and hs tried to fine tune TCP protocol for Web for better efficiency.
So, people can say web programming is the way to go.
However, I still feel limitation in web programming paradigm.
Also, although many web frameworks hides the ugly face of HTTP, but HTML/CSS/JavaScript is not really created for interactivity. Well, AJAX solves it. But still it’s like to find a way to introduce native-app like interation on top of a layer which was not designed for that.

I was a long time web developer. When one tried to become everything, it usually failed in the history of computer.

Currently, AJAX based trend looks to be better than that of PL/1 and Java, but basically I see lots of inefficiency with web based development.

Moreover, when tried to integrate Google services to a native app, it’s cumbersome, and Google don’t provide good document or sufficiently good behavior of API.
Some people would shout what I’m talking about.
Yes. Google’s documentation looks pretty and looks thourough until you actually start to work on them. You see lots of missing information and missing link, or not-so-clear explanation.
It’s better than MS documentation, but it lacks in other area.

I wish Google introduce more C/C++ based platform independent SDKs for integrating their service into native apps.

Follow

Get every new post delivered to your Inbox.

Join 41 other followers

%d bloggers like this: