Fourth edition of Python Media Computation released today: Teacher resources and desirable difficulties | Computing Education Blog
Everything in this book is useful when wanting to write Python code for Blender, Maya, Android, etc. This is an introductory book on data, loops, conditionals, and objects. Those parts of Python are identical in this book and in the Python that you’ll use in Blender, Maya, and Android. For introductory Python programming, Jython and CPython are exactly the same.
I was surprised to see the original commenter responded. His point was that some kinds of friction, in dealing with
the “real world” is desirable:
As an introductory book, I would expect a section on how to install and configure Python. Written covering Windows, Linux, and the Mac OSX. There is no such section; the whole point of Jython is to “hide” this technical level.
...(Read whole news on source site)
Probably the best mechanism for auditing changes to tables in SQL Server is Change Data Capture
, which I already covered here
. Unfortunately, it only works with the Enterprise editions of SQL Server, something that not everyone has access to.I once had to implement a similar solution that should work on any edition of SQL Server, which is what I am going to talk about. Its only requirement was that for any changes made to target tables, their old values would be stored in a shared history table, with the indication of the timestamp and
Microsoft took a tax hit due to an IRS audit adjustment last quarter, but its ongoing tax dispute with the IRS looks to wage on, possibly for another year.
Note, this post was written by Federico
. Where I had notes or stuff to extend, I explicitly marked it as such. In the previous post
after inspecting the decompiled source using ILSpy we were able to uncover potential things we could do. Getting rid of unwanted type conversion may seem as an small cost, but let’s make an example. Let’s say we are comparing 2 memory arrays of 16 bytes and they are equal (our worst case scenario). Just for the sake of simplification from the 3 potential causes the memory is aligned so there is
no need to the first 2 unwanted conversions. That leaves us with the main body as the only source of unwanted conversions.
Now this loops moves our pointer 4 bytes each time and causes 2 conversions. Therefore for a 16 bytes array (a pretty average size) we are performing 8 conversions, that is grand total of 8 conversions. Assuming our idealized processor, at 0.33 ns per conversion instruction we have 2.64 ns or roughly 3% of the total time per average call. Getting rid of that is easy, as the size of an unsigned int is...(Read whole news on source site)
December 9th, 2012., was my first day at JetBrains
, after being in consultancy for a good 7 years. Hadi Hariri
, my new boss, showed the world how new employees are treated
. If you know Hadi, that was obviously just for laughs. Not one day have I considered him as a boss, yet as a friend who worked with me on great things. I had a great time in the past two years working with him and the many awesome people at JetBrains. I have traveled a lot, written many blog posts and tutorials (less on my own
blog, I admit) and much, much more. Thanks, JetBrains, thanks, community I have worked with, and thanks, Hadi, for making this an awesome time! It’s been a great opportunity and a great adventure. As a moonlighting project, Xavier Decoster
and I have been working on MyGet
, a software-as-a-service. It started as a simple prototype, which evolved into a service that hosts thousands of feeds and provides a solution for many developers, OSS projects and companies worldwide. You can find us in the Azure Store, we became VSO Launch partners at TechEd, and we even host nightly builds for...(Read whole news on source site)
Entity Framework supports Enum properties on your model, but there’s one little gotcha that’s bitten me on more than one occasion now. In your database, you may be tempted to save space by configuring the backing column to use an integer value that takes up less space than a normal int, such as a TINYINT (byte) or SMALLINT (short). If you do though, you may get an error like the following: System.InvalidOperationException : The 'State' property on 'Issue' could not be set to a 'System.Byte' value. You must set this property to a non-null value of
type 'IssueState'. It sounds like EF is trying to assign the raw Byte value to the property rather than converting it to an Enum member, and indeed that’s what it’s doing. Fortunately, the fix is easy: just change the base type of your enum! By default, enums derive from System.Int32, but you can change that: public enum IssueState : byte
New = 0,
InProgress = 1,
ReadyForQA = 2,
Deferred = 10,
Closed = 20
Now EF will hydrate your entity with...(Read whole news on source site)
Continuing on with my ramblings from last time
: refactoring is a powerful tool that can help you transition your application (solution) from the complex end of the spectrum towards the simpler end. Let’s consider our simple problem again: “Given an integer X, find the next integer larger than X.” And our overly-complex solution: f(x) = (x^2/x) + 1. Thanks to a little thing called “math,” we can reduce this solution back to its simplest form, our so-called perfect solution, f(x) = x + 1. I believe this same process holds true in software.
We can simplify a complex solution we’ve created to arrive at a simpler, more-maintainable one. One of the best tools we have for making this transition is refactoring. As we refactor code, we’d like to move up this triangle. If refactoring doesn’t move us in that direction, then we should consider whether the refactoring is actually beneficial. One thing to keep in mind is that there isn’t a way to simplify every solution. Sometimes there is no path leading further up the triangle from where you’re at. If that’s true, it can mean only...(Read whole news on source site)
Just a quick note as I installed the Visual Studio 2015 Preview from here; Visual Studio 2015 onto a system where I already had Visual Studio 2013 installed along with Xamarin’s cross-platform tools and it took me a couple of steps to get things up and...(read more