Recently I
have faced the problem with Intellisense performance in Visual Studio 2012 for
C++ , caused by Precompiled Headers feature being disabled. After eye-parsing
some pages on the web including MSDN itself, MSDN blogs, stackoverflow and some
other, I have managed to make the thing work fast enough, so that it doesn’t
prevent me from coding. Still I find both the issue as well as the
solution to it to be pretty undocumented and will thus explain my findings here in the
form of a walkthrough.
a collection of lengthy notes on how I am usually coward to do what is wrong and how I am sometimes brave to do what is right. Bits of management and self management, .NET programming, Clojure parenthesis and lots of design mistakes are the things one will find here.
понедельник, 21 октября 2013 г.
Visual C++: PCH is not for Precompiled Hell
Labels:
c++,
cinder,
code,
cpp,
headers,
intellisense,
pch,
precompiled,
programming,
software development,
solution,
tinderbox,
visual studio,
vs2012,
walkthrough
вторник, 8 октября 2013 г.
Testing: Factory Method
These days
I am working slowly on a Windows Phone application. Making my first steps in
this direction turned out to be quite frustrating, although this is a topic for
another post. As a disciplined developer (ha!) I started the project with unit tests
and while writing these I noticed that there is a thing that I do automatically
now. Including a kind of factory method into each and every test class which I
write has become a habit for me, saving a lot of time and effort.
понедельник, 9 сентября 2013 г.
Road to Chaos
A few of my
recent posts are devoted to various chaotic systems, in which I must have
pointed out that my exploration of Chaos Theory in its simplest forms started
quite long ago. Now it is a lot of joy for me to remember how these beautiful
things gradually came into my life to make up a small but important share of
what I learn and do. It turns out that it was a sequence of loosely, if at all,
connected events that led me to programming ferns and double loops, most
of which were characterized by total absence of any link to science.
Labels:
ai,
alignment,
artificial intelligence,
books,
chaos,
Chaos Theory,
fantasy,
games,
me,
memories,
motivation,
path,
road,
science,
warhammer
воскресенье, 25 августа 2013 г.
Python: Lorenz
If you follow my blog
or have devoted at least a minute to run through the headings, you should know that
I am a fanatic of Chaos Theory. Or rather, I am crazy about messing with very
simple systems, which are related to the ideas of sensitive dependence on
initial conditions, unexpectedly complex behavior and other stuff that the
words ‘mathematical chaos’ bring to one’s mind. The key word here is
‘simple’, since, because of very modest math skills, during my exploration I
kept avoiding things involving any non-trivial mathematics. The most notable
here is the fact that I didn’t even try to approach the Lorenz system, whose
phase portrait, along with the plots of Mandelbrot set, may be considered the symbol of the Chaos Theory. However, beside playing with the Barnsley fern the last month I also made up enough guts to try and code the most
well-known chaotic system.
вторник, 6 августа 2013 г.
Clojure: Barnsley Fern
In addition to
other pleasurable events, the last month I got as a gift yet another book devoted to the Chaos
Theory – ‘Simply Chaos’ by Sergey Demenok (in Russian). This one vaguely reminds me of
‘Chaos: Making a New Science’ by James Gleick, since both aim mostly at
attracting readers to science, explaining it to them and showing how beautiful it can be. Still they differ a lot, with ‘Simply Chaos’ being more joyful reading
balancing on the boundary between historical and scientifical truth on one side
and myth and fantasy on the other. This way the last book was a great and funny refresher,
making me remember of some things, that fascinated me while I was reading the
Gleick’s ‘Chaos’ a year and a half ago. Most notably, I faced the idea of
Barnsley Fern once more.
вторник, 30 июля 2013 г.
Regularities
Recently I came across an advice on blogging by John Sonmez – he recommends those
willing to maintain a personal blog to post there regularly – best of all,
according to a strict schedule. As a mature blogger and, at the same time, an
athlete, he definitely knows what he’s talking about. On the other hand, in the last post I mentioned that employment made my life more ‘scheduled’ in a way
that seems positive to me. This makes me search for some reason making
regularities desired for us and helpful in achieving our goals.
First, it
is easy to note that the things we do regularly determine what we are in the
eyes of others. For instance, you are considered a software developer if you
devote several days a week to software engineering activities. The same way,
one is called an alcoholic if and only if they drink a lot of spirits and do
that on a daily basis (more or less). However, obviously, John didn’t mean this
simple fact – i.e. if you post every day, you are a blogger, period – advising
to blog regularly. Similarly, I like the fact that now I work from 11 a.m. till
8 p.m. on average not merely because doing so allows me to deem
myself a proper citizen, but because this gives me finer control over my life,
and that is what makes following certain patterns in a constant and consistent
manner so important.
Actually,
regular behavior is what allows for fine control. The nature of this idea can
be seen clearly when one views it the way control theorists and machine
learners do. For those who build automated systems control is all about
minimizing error – the difference between the observed and the desired
behavior. What makes the engineering approach so
valuable is that it begins with acknowledging the possibility – or, better,
inevitability – of errors. The idea to do so is as obvious as different from
what people (including me) usually do – when deciding to start something new we
tend to believe that we’ll succeed easily and quickly, and the sun will shine.
While the latter assumption is certainly true, there is a problem with the
former – we do fail.
Let’s
follow the engineer’s path: say we prepared ourselves for failing and are ready
to go – what does it have to do with regularities? The trick is that to succeed
one needs to fail a lot and to do that on a regular basis, thus opening the
doors to controlling things. Achieving one’s goals is made possible by the
flow of information generated by doing something regularly. Only if you continuously
get this information it can help you move closer to your goals. Not only setting
up a schedule of blog posts allows one to know instantly when they fail and
to react as soon as possible – it permits
looking back and understanding the nature of one’s mistakes, making it possible
to perform better in future. Furthermore, one shouldn’t forget that we, humans, are in fact
sophisticated control systems and behave, to some extent, in the same
error-minimizing fashion. When we deviate from a well-established behavior pattern,
we tend to return to it unconsciously. That is, we develop habits and this is another
reason to evenly divide the way to your targets into carefully defined steps.
Having said
this, I can easily explain why getting employed feels so positive to me even if
I don’t take into consideration the obvious benefits of a challenging and
well-paid job. Surprisingly, the great part is that the job takes a great deal
of my time and does that in a regular manner. Combined with the time spent on commuting,
having breakfast and lunch, plus some other ‘transactional expenses’, this
leaves me with approximately 3 to 4 hours each working day to do some cool and valuable
stuff not related to work. Knowing this figure and realizing that it won’t change,
I am free from illusions of having a lot of time to tackle everything I want.
Even more, whenever (quite often) I fail to spend this free time on something
worthy I know precisely how much I lose. With this same principle applying to
other resources – say, money – as well, I now have a lot of information to be more
manageable.
Keeping all
this stuff in my head, I do not search to eliminate any uncertainties and 'free will'
completely, since that is both impossible and boring. Still, I believe that in
case I want to succeed in something, I should work toward my aims regularly –
with close to constant pace and in carefully allocated timeframes. This is almost as important as knowing precisely where I want to arrive.
суббота, 13 июля 2013 г.
The Candidate's Wishlist: Wrecked
After
defending the diploma in the end of June I have finally got employed this week.
I already feel how the job changes my life and get first benefits from it, but
what is more interesting right now is the rapid mutation of my views on
working as a programmer.
It is easy
to track these changes because before engaging into a series of job interviews
back in the last month I made up the so-called candidate’s wishlist – a set of
about ten points, which I deemed important in the context of choosing a company
to work for. What makes me speak of it here is the fact that some of the items are
not fulfilled, though this makes me even happier with the new job.
One thing
that I desired is a comfortable office. When composing my wishlist I tried to
imagine the place where I would like to develop software: it had an A/C, a
coffee maker and a teapot as well as other stuff of this kind – we have all of
this. The workplaces with decent computers in my ideal office were distributed
across several medium-sized rooms hosting three to five people each. That’s
precisely where I failed: we have an open-space. I heard a lot of bad words
about open-space and feared it a bit, but now I thank God for getting into this
one. Although it makes the boundaries of my private zone elusive – almost non-existent
– it is at the same time very friendly and welcoming. Being able to constantly
see the colleagues around me working, engaging into passionate conversations
regarding our progress and simply striding to and fro somehow motivates and,
instead of distracting, helps to concentrate on doing my own job. After a couple
of days there I truly believe that the way our office is organized plays a
major role in making me a part of my new team – that’s something that,
surprisingly, I have never heard about open-space.
On the other side, mere
floor and walls – or their absence – can’t do much to improve and make easier
one’s interaction with colleagues – that’s the people who make the difference. Upon coming
to the office last Monday I found about three dozen interesting and kind men
and women there, who are indeed willing to help me to get accustomed to the new
job and environment. It turned out that not only my teamleader is concerned about
my progress, but also other seniors do pay attention to what I do and, even
though I am mostly learning new stuff now, they make me feel that I contribute
a little to the progress of the whole company.
Beside the
requirements to the office and the presence of experienced developers my
wishlist included the desired size of the team – I thought that it should
lie somewhere between five and eight people. The company failed this
expectation as well – I am actually going to become the third guy working on a
project and we don’t expect any more newcomers. At the same time, after the
week on job I feel I can’t easily draw a line between our team and the others –
we depend too strongly on those who do other pieces of work and they do depend
on us to some extent. Due to this fact combined with the close to absolute
availability of every colleague provided be the open-space I could say that the
size of my team is about 30 developers, QAs and support engineers. This leads
me to an interesting idea: the tradeoff between a small team and a large one is
actually a tradeoff between the availability of many experienced colleagues to
learn from and the ability to focus on a particular piece of work – software in
my case – and the corresponding features and customers. It seems to me that the
configuration with a very small team nested in a larger one and strongly
connected with the latter’s other parts provides me both kinds of benefit. I
know there are no silver bullets and free lunches and I might face some drawbacks in future,
although I believe I am really lucky to have things laid out this way. Moreover,
now I am not sure if organizing the development of the system of our kind is
actually possible in some other fashion.
In addition
to wrecking my wishlist this way, the job also affects my
life outside the office significantly. I always stated that a full-time position is not only a
source of income – it is a way to spend less as well. Now, as my spending
halved, I have an actual proof of this hypothesis. Moreover, the positive
outcomes of my employment are not limited just to the improved trade balance –
I also smoke less and even procrastinate much less. On the other side, being
obliged to work every day except weekends I can’t devote as much time to, say,
this blog and my pet-projects as I used to. However, the lack of free time
makes me manage it carefully to be able to do more. Combined with the fact that
the job allows me to do something important for the company and its customers
that’s a fair compensation. Finally, the ease with which I wake up these days confirms
that I am pretty satisfied with my new employer and the regularities, which
employment brought into my life.
Подписаться на:
Сообщения (Atom)