Sunday, July 17, 2016

my post and thoughts about what is a Senior Developer

So i've just written a post measuring myself according to Programmer Competency Matrix, and i know this matrix for a long time and its a really awesome matrix to test for a highly technologically skilled developer, i think that a real senior is something even past a Team Leader, and for that i'll try to build my own matrix, and comment be about it :D.

Some of these thoughts you can read from some links i collected here

p.s. IMHO anyone that is intermediate in in all skills can be a great Team Leader, since the main thing about being a TL is the mentoring and grouping part. I see many TL that are noobs/juniors in many of these fields.

Don't think i am anywhere near senior, am a "proud" junior trying to advance into mid, but i take a look at a couple of real senior @work and this is more of my observation about them and after getting pounded by their feedback.

skill noob junior intermediate senior
tech skill - measured by Programmer Competency Matrix 0-30 30-50 50-70 70+
human skillsunaware of his severe lack of skillsaware but cant understand how it will take him forward in his careercontinuously learningable to read people, giving them what they want to hear while saying what they need to hear, is wanted in all meetings
time table cant manage a time table, need to be nanny-edcan manage his own time per taskcan manage his own time for multiple tasks and help / prepare / nanny otherscan manage the entire project, including spec, QA, deployments, surprises, ect., can expect realistic delays
task managementcant manage more that his current taskcan manage few parallels taskscan manage most tasks that matches his skills-set in the project, to a limitcan manage the entire project, including .....
mentoringcant even accept helpable to accept helpable to give good productive helpable to identify the real backset of the other and give him aimed and specific help (able to say dont learn this)
profession / code skillsknows about his code onlyknows what is happening with system around his code, both framework, server, ect, and whatever the team has make and can understand the impact on his code and react accordinglylike the former but can also plan ahead and even take use and advantage understand everything around the code and the project, knows IT better that the IT guys, can plan the project according to the hardware
methods / patternscan code only strait forwardknows about them yet still competing which is bestused multiple and knows that there is no best, only appropriateable to understand a pattern from reading, knows to choose the most appropriate per project
businesscant relate business to his workunderstands that someone is paying and able to  adjust a bitunderstands that the money in the final say and able to adjust accordingly by demand (doing it "less best practice")completely aware and design all work according to budget
QAblames someone else for his wrongs ("you didn't tell me to do it like this")hate QA since he is still unable to connect his wrongs to the bugsdoesn't hates QA anymore and is implementing bug fixes as lessons to himselfafter QA cant find any bugs he teaches them that real QA should test the flows and he adds smoothness to that
self-estimationthinks he can handle the entire project, hard to learnthinks he knows best, able to learn after hard failureunderstands he is a junior, able to learn from anythingcan handle the even he can handle the project ect. he is still always exposed to mistakes ect., is asking for help and second opinion, able to learn without a cause (like bug or feedback)

Friday, July 15, 2016

self-test for the Programmer Competency Matrix by Sijin Joseph

The Programmer Competency Matrix by Sijin Joseph is a table of parameters to test the reward you will get from a programmer vs the effort you'll put in him.

Also is considered to measure whether a programmer is noob, junior, intermediate, or senior, which is a whole subject by itself that i hope to write about next time.

anyway, for the fun and interest, i will test myself, as objective as i can be, (i'll ask some guys @work to correct me and update), so the columns will be subject, my notes, score. 0-3 will be the scores so 0 is total noob, 32 is junior, 64 is intermediate and 96 is senior.

Note that since there is such a huge variety of skill someone that actually scores 96 is like the top of the world senior, and you should thing it more like 0-32,  32-60, 60-75, 75-96, since scoring 32 should be quite fast to any programmer that wants to step up, and anyone that scores 2 in everything is really a junior-senior, and even just a few scores of 3 is a real senior already.

I count on you to go read the table, so.....

skill notes score
Computer Sciencetotal points: 91.5
data structures I can even explain a bit but not in depth 1
algorithms Ye, never did any degree, i can look for the right one and alter it but not explain or write one 0
systems programmingI have some knowledge about compilers, assembly and basic CPU suff0.5
Software Engineeringtotal points: 91.5
source code version controlUsed once a bit SVN and using a bit Git, know merging ect. if TFS1.5
build automationI know technically there is a way to compile C# from CMD, did  some with python, have some automation with PowerShell0
automated testingI think like 1, but act like 00
Programmingtotal points: 4525
problem decompositionI always try to make my code generic and put the base layer in a designated zone for reuse, i would give myself a 3 here but i'll try to be modest.2.5
systems decompositionCurrently (actively) learning to apply design to correspond all relevant technologies/platforms.1.5
communicationWell, this is really the only thing i have a really good feedback except for my lazy emails....2
code organization within a fileUsing regions, code organized, basic commenting, refrences only where critical1.5
code organization across filesI naturally like organizing my files in folders, cant give myself "structure gives insight into design"2
source tree organizationHere i am a bit closed to 3, but still2
code readabilityI am improving, i used to be 0, have some comments about unusual code and bug fixes but mostly for myself1
defensive codingOnly checking arguments and return values, or for exceptions when critical, obvious, or after a bug already occurred1
error handlingMost parts of my projects leaves program in good state, good logging layer1.5
IDEI know the basic tools of VS and my own daily shortcuts1.5
APIThis one is hard since i definitely write many times some code on top or to fill gaps in the API, even in .Net and JQuery and even Angular, yet i still learn stuff everyday2.5
frameworksUsed and using alot, written 2 mini-frameworks used in my company for Sharepoint2.5
requirementsI can more and more able to see the places needed more spec, but still having mid ideas2
scriptingTouching python for fun, knows well Sharepoint Powershell.1
databaseAble to write good selects, knowledge of columns ect, but not to design a DB nor its concepts0.5
Experiencetotal points: 128
languages with professional experienceOOP, prototype (JS), basic SQL, dont know static vs dynamic ect.0.5
platforms with professional experienceC# [console, winforms],, sharepoint, javascript/JQuery, knockout/Angular, i'll count it as 52
years of professional experienceAlthough programming since i was 8, and it shows, also mentored some 7-8 years guys, in industry almost 5 years, i'll give myself and extra half point1.5
domain knowledgeI'm a web-dev, so i always work on and inside a domain2
Knowledgetotal points: 217
tool knowledgeI know to use some text editors for Client-Side files, can use sharepoint-designer1
languages exposed toMy bonus is that i have basic understanding of prototype oriented (JS), and i know some SQL1
codebase knowledgeNot much in C#, bit in, angular, made some bug-fixes on plugins and able to understand their codebase1
knowledge of upcoming technologiesKeep hearing and reading about upcomings, but never even taken betas1
platform internalsBasic knowledge of how my platforms works internally1
booksMaybe its time.....I'm more of a googler-blog-reader0
blogsHere i am trying to step from 2 to 32

Grand Total: 43

HA HA well that's embarrassing, i always though of myself intermediate licking seniority, guess i'm just finished noobinity and learning to be a true and good intermediate, which is good as long as i am improving.

I am taking additional comfort that i past the 50% in the programming area, so there i am licking some seniority, same in Experience, and main pitfalls in in the science-engineering fields, which i never was into.

Thursday, March 3, 2016

Create Projected Field in Genesis

            ID = "{C3D3C5AF-C1D1-4ED8-B67F-E5BC23E401A7}",
            LookupFieldRef = "{0D4884FE-6D8D-4B8D-BB3A-9AEBD7D28AC0}",
            InternalName = "ProjectIDLookup",
            StaticName = "ProjectIDLookup",
            DisplayName = "$Resources:myRes,Field_ProjectIDLookup_DisplayName;",
            Group = "$Resources:myRes,FieldGroup_NAME_Title;",
            Type = SPFieldType.Lookup,
            LookupList = typeof(Lists.MyList),
            LookupField = typeof(Namespace.Elements.Fields.ID),
            Required = false)]

        public class ProjectedIDLookup: SPGENField<ProjectedIDLookup, SPFieldLookup, SPFieldLookupValue> { }

Wednesday, February 10, 2016

Sharepoint 2013 search: how to make refiner update 2 search web parts

So my case today is having a nice Search Results Page, with a nice Search Results WP and a Refinement WP updating him.

now i added another Content Search WP, and Oh My! it doesnt updates!
since i am used to MS giving a lot of work to developers, that looked like a nice challenge, some advanced client-side Search-Controls work.


1 - Get the new query

that part is easy - its up in the url, with a simple regex i took it out

var rgx = /#Default={[{":,\\}()#\-\[\]a-zA-Z0-9]+}/;
var queryObjStr = decodeURIComponent(window.location.hash)
                     .match(rgx)[0].replace("#Default=", "");

2 - Send it to our control

well, MS did gace us some nice Client-Side API, one of the SRCH objects is the QueryState, which is actually the object in the Default up in our hash

var queryState = JSON.parse(queryObjStr);
var queryStateArgs = new Srch.QueryEventArgs(queryState);
//and tell our control to update

var cc = ctx.ClientControl;

basically if you need some very specific logic you can end reading here.
also note that the you can create your own QueryState object and fill it as you wish like here, just google it a bit.

3 - Put it in your Control Display Template

but i want my WP to be independent, meaning that wherever i throw it around it will know what to do, i.e. update itself from the page refiners.

so obviously i want to put all this login in my Control Display Template

AddPostRenderCallback(ctx, function(){
   $('a[id=FilterLink]').on("click", function(){
      console.log('u clicked me!!');

      var rgx = /#Default={[{":,\\}()#\-\[\]a-zA-Z0-9]+}/;
      var queryObjStr = decodeURIComponent(window.location.hash)
                          .match(rgx)[0].replace("#Default=", "");
      var queryState = JSON.parse(queryObjStr);
      var queryStateArgs = new Srch.QueryEventArgs(queryState);
              var cc = ctx.ClientControl;

so...that should have done it... but....

4 - The "Bugs"

I. After one click it doesn't work again
II. Sometimes it doesn't catch the Refiner Control/s
III. The script never Runs if no initial results

well, for bugs I and II i created a nice interval system, shown immediately, but for III its simple, in the WP Properties uncheck "Dont show anything when there are no results"

for the rest, the point is that all this stuff happens ASYNC, and i found no "OnPostEverything" event or callback, so i just used an interval

var overloadRefiners = function () {
  console.log('overloading Refiners : ' + $('a[id=FilterLink]').length);
  var setRefinerOn = function () {
    console.log('setRefinerOn, attempt ' + window.setRefinerOnCount);
    if (++window.setRefinerOnCount > 5) {
      console.warn('clearing window.setRefinerOnCount after 5 tries');

if ($("[refinername]").length === 0) {
      console.warn('overloading Refiners : no refiner found');

$("[refinername]").on("click", "a[id=FilterLink]", function () {
      console.log('overload Refiner click')

      var rgx = /#Default={[{":,\\}()#\-\[\]a-zA-Z0-9]+}/;
      var queryObjStr = decodeURIComponent(window.location.hash)
                          .match(rgx)[0].replace("#Default=", "");
      var queryState = JSON.parse(queryObjStr);
      var queryStateArgs = new Srch.QueryEventArgs(queryState);

      var cc = ctx.ClientControl;


   window.setRefinerOnCount = 0;
   window.setRefinerOnInterval = setInterval(setRefinerOn, 100);
}//end overloadRefiners

AddPostRenderCallback(ctx, overloadRefiners);

some extra links for start

Wednesday, January 27, 2016

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

if you got an error like this

The item could not be indexed successfully because the item failed in the indexing subsystem. ( The item could not be indexed successfully because the item failed in the indexing subsystem.; Failed to recover content group; Aborting insert of item in Link Database because it was not inserted to the Search Index.; ; SearchID = 04081656-B51B-4DCD-96D4-6DB2D2CEEEE7 )
as well as these:
The item could not be indexed successfully because the item failed in the indexing subsystem. ( The item could not be indexed successfully because the item failed in the indexing subsystem.; Caught exception when preparing generation GID[7]: (Previous generation (last=GID[6], curr=GID[7]) is still active. Cannot open GID[7]); Aborting insert of item in Link Database because it was not inserted to the Search Index.; ; SearchID = 92EB0180-C086-4853-BED8-F4878D9748AD )
the solution for me was to clear configuration cache (PS) and then restart SP Search Services.

THX to my friend Team Leader Elitzur!!

Wednesday, January 6, 2016

Internet Explorer error 'Node' is undefined

if you by any chance get this only in ie its because MS is trying to make the shityest browser ever!!!

the browser probably runs in compatible mode of ie7.

the fix is so ever simple:
<meta http-equiv="x-ua-compatible" content="IE=edge">

Run Sharepoint Powershell as a different user

In the other day i want to set a Pre-Prod stage and wanted to change the Continuous Crawl Interval using the known PS commands

$ssa = Get-SPEnterpriseSearchServiceApplication  
see more here

BUT!  i could not gain access to the search service, and kept getting this error:
format-default : Exception has been thrown by the target of an invocation.

Googling around i got the point that it was a permissions error, mainly from here where it was stated by BastianWebster that you need to do this with the user running the app pool.

now usually its either everything is running with the same super-user, or at least you get your super-user with permissions to rule-them-all, but not this time. i was sp_admin, and, funny as it is, the sp_search, running the pool for the SSA, was not allowed for RDP.

so i just tried to run SP Management Shell, the Sharepoint Powershell (SP PS lol) as a different user but could not!

many suggestions are around there, but maybe they are wrong, and maybe its just WIN 8.1 but here is the full drill:

1. Run CMD as Administrator
2. paste in the following command
    RunAs /u:domain\user “powershell”
    *notice that you need the domain even if you're within it
    *notice the slashes change directions
    *all this seems case sensitive
3. you will be asked for your password, dont miss!
4. copy-paste the shortcut for the SP Management Shell which is all that

    C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe  -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

finally you have a fully running SP PS as another user, ye!!